summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-10-10 07:39:05 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2016-10-10 07:39:05 -0700
commit46b83c0f08f936eb1a0ae761db557169fe295cc7 (patch)
treebdb663d86a908a83b7c953316d04714664b32a0c
parentbe589ea0dc71063d26595378df303a2a1c25ee4e (diff)
parent4f406e9813e073b675bb45613bf1dd111eec2368 (diff)
downloademacs-46b83c0f08f936eb1a0ae761db557169fe295cc7.tar.gz
Merge from origin/emacs-25
4f406e9 CC Mode manual: remove reference to former Emacs variable las... 44e402e Allow to disable compaction of font caches 4ff4b66 Allow selection of font for symbols as in Emacs 24.x c03d44b ; Fix last commit d4be4f3 ; Fix indexing in lispref manual ed399f2 ; Minor improvement in documentation of generators 197a6bc Fix horizontal scrolling during Isearch 3566644 Fix infloop in redisplay due to truncated lines and invisible... # Conflicts: # etc/NEWS
-rw-r--r--doc/lispref/control.texi1
-rw-r--r--doc/lispref/errors.texi3
-rw-r--r--doc/lispref/functions.texi3
-rw-r--r--doc/misc/cc-mode.texi9
-rw-r--r--etc/NEWS.2537
-rw-r--r--lisp/isearch.el3
-rw-r--r--src/alloc.c6
-rw-r--r--src/font.c13
-rw-r--r--src/fontset.c13
-rw-r--r--src/xdisp.c5
10 files changed, 72 insertions, 21 deletions
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi
index 0cdb03548bf..0c0827909a3 100644
--- a/doc/lispref/control.texi
+++ b/doc/lispref/control.texi
@@ -805,6 +805,7 @@ The following piece of code demonstrates some important principles of
working with iterators.
@example
+(require 'generator)
(iter-defun my-iter (x)
(iter-yield (1+ (iter-yield (1+ x))))
;; Return normally
diff --git a/doc/lispref/errors.texi b/doc/lispref/errors.texi
index c2bab019274..03aea4ef445 100644
--- a/doc/lispref/errors.texi
+++ b/doc/lispref/errors.texi
@@ -190,8 +190,7 @@ The message is @samp{Symbol's value as variable is void}.
@xref{Accessing Variables}.
@item wrong-number-of-arguments
-The message is @samp{Wrong number of arguments}. @xref{Classifying
-Lists}.
+The message is @samp{Wrong number of arguments}. @xref{Argument List}.
@item wrong-type-argument
The message is @samp{Wrong type argument}. @xref{Type Predicates}.
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index fff4ac0ee8d..8dff1a70f75 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -346,7 +346,8 @@ stored as symbol function definitions to produce named functions
Our simple sample function, @code{(lambda (a b c) (+ a b c))},
specifies three argument variables, so it must be called with three
arguments: if you try to call it with only two arguments or four
-arguments, you get a @code{wrong-number-of-arguments} error.
+arguments, you get a @code{wrong-number-of-arguments} error
+(@pxref{Errors}).
It is often convenient to write a function that allows certain
arguments to be omitted. For example, the function @code{substring}
diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi
index 691616917b7..4f7711184d0 100644
--- a/doc/misc/cc-mode.texi
+++ b/doc/misc/cc-mode.texi
@@ -3544,10 +3544,11 @@ use, add this function to the front of the
@example
(defun c-semi&comma-no-newlines-before-nonblanks ()
(save-excursion
- (if (and (eq last-command-char ?\;)
- (zerop (forward-line 1))
- (not (looking-at "^[ \t]*$")))
- 'stop
+ (if (and (= (c-last-command-char) ?\;)
+ (zerop (forward-line 1))
+ (bolp) ; forward-line has funny behavior at eob.
+ (not (looking-at "^[ \t]*$")))
+ 'stop
nil)))
@end example
@end defun
diff --git a/etc/NEWS.25 b/etc/NEWS.25
index 978c90a7a5e..3e686f98db3 100644
--- a/etc/NEWS.25
+++ b/etc/NEWS.25
@@ -15,12 +15,34 @@ and NEWS.1-17 for changes in older Emacs versions.
You can narrow news to a specific version by calling 'view-emacs-news'
with a prefix argument or by typing C-u C-h C-n.
-Temporary note:
-+++ indicates that all necessary documentation updates are complete.
- (This means all relevant manuals in doc/ AND lisp doc-strings.)
---- means no change in the manuals is needed.
-When you add a new item, use the appropriate mark if you are sure it applies,
-otherwise leave it unmarked.
+
+* Changes in Emacs 25.2
+This is a bug-fix release with (almost) no new features.
+
+---
+** `find-library', `help-function-def' and `help-variable-def' now run
+`find-function-after-hook'.
+
++++
+** New basic face 'fixed-pitch-serif', for a fixed-width font with serifs.
+The Info-quoted and tex-verbatim faces now default to inheriting from
+it.
+
+---
+** New variable 'use-default-font-for-symbols' for backward compatibility.
+This variable allows to get back pre-Emacs 25 behavior whereby the
+font for displaying symbol and punctuation characters was always
+selected according to your fontset setup. Emacs 25 by default tries
+to use the default face's font for such characters, disregarding the
+fontsets if the default font supports these characters. Set this
+variable to nil to disable the new behavior and get back the old
+behavior.
+
+---
+** New variable 'inhibit-compacting-font-caches'.
+Set this variable to a non-nil value to speed up display of characters
+using large fonts, at the price of a larger memory footprint of the
+Emacs session.
* Installation Changes in Emacs 25.1
@@ -896,9 +918,6 @@ looking for macro definitions. By default, no symbols are ignored.
** TeX mode
-*** When in a TeX (LaTeX, etc) comment, insert a normal double quote (")
-instead of defaulting to TeX-style open (``) or close ('') quote marks.
-
*** New custom variable 'tex-print-file-extension' to help users who
use PDF instead of DVI.
diff --git a/lisp/isearch.el b/lisp/isearch.el
index ce87d1bac3c..0416b08eba2 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1008,7 +1008,8 @@ The last thing is to trigger a new round of lazy highlighting."
;; pos-visible-in-window-group-p returns non-nil, but
;; the X coordinate it returns is 1 pixel beyond
;; the last visible one.
- (>= (car visible-p) (window-body-width nil t)))
+ (>= (car visible-p)
+ (* (window-max-chars-per-line) (frame-char-width))))
(set-window-hscroll (selected-window) current-scroll))))
(if isearch-other-end
(if (< isearch-other-end (point)) ; isearch-forward?
diff --git a/src/alloc.c b/src/alloc.c
index 72987dd3190..ab23072aafa 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -5598,7 +5598,11 @@ compact_font_caches (void)
for (t = terminal_list; t; t = t->next_terminal)
{
Lisp_Object cache = TERMINAL_FONT_CACHE (t);
- if (CONSP (cache))
+ /* Inhibit compacting the caches if the user so wishes. Some of
+ the users don't mind a larger memory footprint, but do mind
+ slower redisplay. */
+ if (!inhibit_compacting_font_caches
+ && CONSP (cache))
{
Lisp_Object entry;
diff --git a/src/font.c b/src/font.c
index cfbc5c7e266..f8e6794cbb1 100644
--- a/src/font.c
+++ b/src/font.c
@@ -5434,6 +5434,19 @@ Set it to nil to enable logging. If the environment variable
EMACS_FONT_LOG is set at startup, it defaults to nil. */);
Vfont_log = Qnil;
+ DEFVAR_BOOL ("inhibit-compacting-font-caches", inhibit_compacting_font_caches,
+ doc: /*
+If non-nil, don't compact font caches during GC.
+Some large fonts cause lots of consing and trigger GC. If they
+are removed from the font caches, they will need to be opened
+again during redisplay, which slows down redisplay. If you
+see font-related delays in displaying some special characters,
+and cannot switch to a smaller font for those characters, set
+this variable non-nil.
+Disabling compaction of font caches might enlarge the Emacs memory
+footprint in sessions that use lots of different fonts. */);
+ inhibit_compacting_font_caches = 0;
+
#ifdef HAVE_WINDOW_SYSTEM
#ifdef HAVE_FREETYPE
syms_of_ftfont ();
diff --git a/src/fontset.c b/src/fontset.c
index fe595d81a3e..38ff780ccba 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -921,7 +921,8 @@ face_for_char (struct frame *f, struct face *face, int c,
if (ASCII_CHAR_P (c) || CHAR_BYTE8_P (c))
return face->ascii_face->id;
- if (c > 0 && EQ (CHAR_TABLE_REF (Vchar_script_table, c), Qsymbol))
+ if (use_default_font_for_symbols /* let the user disable this feature */
+ && c > 0 && EQ (CHAR_TABLE_REF (Vchar_script_table, c), Qsymbol))
{
/* Fonts often have characters for punctuation and other
symbols, even if they don't match the 'symbol' script. So
@@ -2150,6 +2151,16 @@ This affects how a composite character which contains
such a character is displayed on screen. */);
Vuse_default_ascent = Qnil;
+ DEFVAR_BOOL ("use-default-font-for-symbols", use_default_font_for_symbols,
+ doc: /*
+If non-nil, use the default face's font for symbols and punctuation.
+
+By default, Emacs will try to use the default face's font for
+displaying symbol and punctuation characters, disregarding the
+fontsets, if the default font can display the character.
+Set this to nil to make Emacs honor the fontsets instead. */);
+ use_default_font_for_symbols = 1;
+
DEFVAR_LISP ("ignore-relative-composition", Vignore_relative_composition,
doc: /*
Char table of characters which are not composed relatively.
diff --git a/src/xdisp.c b/src/xdisp.c
index 3eb11cc0c1e..3af5ea49ab6 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -6304,9 +6304,10 @@ forward_to_next_line_start (struct it *it, bool *skipped_p,
}
else
{
- while (get_next_display_element (it)
- && !newline_found_p)
+ while (!newline_found_p)
{
+ if (!get_next_display_element (it))
+ break;
newline_found_p = ITERATOR_AT_END_OF_LINE_P (it);
if (newline_found_p && it->bidi_p && bidi_it_prev)
*bidi_it_prev = it->bidi_it;