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
This commit is contained in:
Paul Eggert 2016-10-10 07:39:05 -07:00
commit 46b83c0f08
10 changed files with 72 additions and 21 deletions

View file

@ -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

View file

@ -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}.

View file

@ -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}

View file

@ -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

View file

@ -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.

View file

@ -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?

View file

@ -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;

View file

@ -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 ();

View file

@ -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.

View file

@ -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;