summaryrefslogtreecommitdiff
path: root/src
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 /src
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
Diffstat (limited to 'src')
-rw-r--r--src/alloc.c6
-rw-r--r--src/font.c13
-rw-r--r--src/fontset.c13
-rw-r--r--src/xdisp.c5
4 files changed, 33 insertions, 4 deletions
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;