diff options
| author | Eli Zaretskii | 2016-10-08 22:31:14 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2016-10-08 22:31:14 +0300 |
| commit | 44e402ead35eb9b4d0bf8a94a4d3ca933629aba9 (patch) | |
| tree | 4fea0c439333c80c05e03585c5b3b7a7f9ea6b35 /src/font.c | |
| parent | 4ff4b66df8da175d8df292d12a30ab50285b6917 (diff) | |
| download | emacs-44e402ead35eb9b4d0bf8a94a4d3ca933629aba9.tar.gz emacs-44e402ead35eb9b4d0bf8a94a4d3ca933629aba9.zip | |
Allow to disable compaction of font caches
* src/font.c (syms_of_font) <inhibit-compacting-font-caches>: New
boolean variable.
* src/alloc.c (compact_font_caches): Use it to bypass the call to
compact_font_cache_entry. (Bug#24634) (Bug#24565)
* etc/NEWS: Mention the new variable.
Diffstat (limited to 'src/font.c')
| -rw-r--r-- | src/font.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/font.c b/src/font.c index 2519599bc63..b85956f225c 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -5430,6 +5430,19 @@ Set it to nil to enable logging. If the environment variable | |||
| 5430 | EMACS_FONT_LOG is set at startup, it defaults to nil. */); | 5430 | EMACS_FONT_LOG is set at startup, it defaults to nil. */); |
| 5431 | Vfont_log = Qnil; | 5431 | Vfont_log = Qnil; |
| 5432 | 5432 | ||
| 5433 | DEFVAR_BOOL ("inhibit-compacting-font-caches", inhibit_compacting_font_caches, | ||
| 5434 | doc: /* | ||
| 5435 | If non-nil, don't compact font caches during GC. | ||
| 5436 | Some large fonts cause lots of consing and trigger GC. If they | ||
| 5437 | are removed from the font caches, they will need to be opened | ||
| 5438 | again during redisplay, which slows down redisplay. If you | ||
| 5439 | see font-related delays in displaying some special characters, | ||
| 5440 | and cannot switch to a smaller font for those characters, set | ||
| 5441 | this variable non-nil. | ||
| 5442 | Disabling compaction of font caches might enlarge the Emacs memory | ||
| 5443 | footprint in sessions that use lots of different fonts. */); | ||
| 5444 | inhibit_compacting_font_caches = 0; | ||
| 5445 | |||
| 5433 | #ifdef HAVE_WINDOW_SYSTEM | 5446 | #ifdef HAVE_WINDOW_SYSTEM |
| 5434 | #ifdef HAVE_FREETYPE | 5447 | #ifdef HAVE_FREETYPE |
| 5435 | syms_of_ftfont (); | 5448 | syms_of_ftfont (); |