diff options
| author | Eli Zaretskii | 2014-08-07 18:18:10 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2014-08-07 18:18:10 +0300 |
| commit | 8db811eff1b890cfc12e065d86a9f93bf974e364 (patch) | |
| tree | bd1e5eec23727053cded4d0385c2cbfe787f066c /src | |
| parent | 6df16fba2a27196a4307dc3cad5d417fc207fd13 (diff) | |
| download | emacs-8db811eff1b890cfc12e065d86a9f93bf974e364.tar.gz emacs-8db811eff1b890cfc12e065d86a9f93bf974e364.zip | |
Fix bug #18162 with assertion violations due to empty face cache.
src/fontset.c (Finternal_char_font): Recompute basic faces if the
frame's face cache was cleared.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/fontset.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index de56e3501d8..a3ebe781be5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-08-07 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * fontset.c (Finternal_char_font): Recompute basic faces if the | ||
| 4 | frame's face cache was cleared. (Bug#18162) | ||
| 5 | |||
| 1 | 2014-08-05 Dmitry Antipov <dmantipov@yandex.ru> | 6 | 2014-08-05 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 7 | ||
| 3 | Fix bug with uninitialized undo list of an indirect buffer (Bug#18180). | 8 | Fix bug with uninitialized undo list of an indirect buffer (Bug#18180). |
diff --git a/src/fontset.c b/src/fontset.c index 13f5357be64..08413ae1571 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -1860,6 +1860,10 @@ DEFUN ("internal-char-font", Finternal_char_font, Sinternal_char_font, 1, 2, 0, | |||
| 1860 | return Qnil; | 1860 | return Qnil; |
| 1861 | if (!FRAME_WINDOW_P (f)) | 1861 | if (!FRAME_WINDOW_P (f)) |
| 1862 | return Qnil; | 1862 | return Qnil; |
| 1863 | /* We need the basic faces to be valid below, so recompute them if | ||
| 1864 | some code just happened to clear the face cache. */ | ||
| 1865 | if (FRAME_FACE_CACHE (f)->used == 0) | ||
| 1866 | recompute_basic_faces (f); | ||
| 1863 | face_id = FACE_FOR_CHAR (f, FACE_FROM_ID (f, face_id), c, pos, Qnil); | 1867 | face_id = FACE_FOR_CHAR (f, FACE_FROM_ID (f, face_id), c, pos, Qnil); |
| 1864 | face = FACE_FROM_ID (f, face_id); | 1868 | face = FACE_FROM_ID (f, face_id); |
| 1865 | if (face->font) | 1869 | if (face->font) |