diff options
| author | Joakim Verona | 2013-08-13 10:31:40 +0200 |
|---|---|---|
| committer | Joakim Verona | 2013-08-13 10:31:40 +0200 |
| commit | 8cd462fd025ea06895b9e4508c869b61d6be28d3 (patch) | |
| tree | 6faec45674f50844187625fe96977fff6b790f08 /src | |
| parent | c84d5d936dbda2084b2c08364c8c0d5e514fc1b6 (diff) | |
| parent | a45543bc75e845c9217130c65ddd00a81c18ffd1 (diff) | |
| download | emacs-8cd462fd025ea06895b9e4508c869b61d6be28d3.tar.gz emacs-8cd462fd025ea06895b9e4508c869b61d6be28d3.zip | |
merge from trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 13 | ||||
| -rw-r--r-- | src/font.c | 50 | ||||
| -rw-r--r-- | src/font.h | 1 | ||||
| -rw-r--r-- | src/window.c | 2 | ||||
| -rw-r--r-- | src/xfaces.c | 10 |
5 files changed, 45 insertions, 31 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 3b8dfe011ee..74af248575a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,16 @@ | |||
| 1 | 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 2 | |||
| 3 | * font.c (clear_font_cache): New function, stripped from... | ||
| 4 | (Fclear_font_cache): ...here, which now uses the function | ||
| 5 | above. Adjust comment. | ||
| 6 | * font.h (clear_font_cache): Add prototype. | ||
| 7 | * xfaces.c (clear_face_cache): Use clear_font_cache. | ||
| 8 | |||
| 9 | 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 10 | |||
| 11 | * window.c (Fset_window_start): Compare `w', not `window' because | ||
| 12 | `w' might not be equal to `window' after call to decode_live_window. | ||
| 13 | |||
| 1 | 2013-08-12 Paul Eggert <eggert@cs.ucla.edu> | 14 | 2013-08-12 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 15 | ||
| 3 | * process.c (deactivate_process): Reset fds to -1 (Bug#15035). | 16 | * process.c (deactivate_process): Reset fds to -1 (Bug#15035). |
diff --git a/src/font.c b/src/font.c index 073487b540d..6a8262623dc 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -4226,36 +4226,38 @@ the consecutive wildcards are folded into one. */) | |||
| 4226 | return make_string (name, namelen); | 4226 | return make_string (name, namelen); |
| 4227 | } | 4227 | } |
| 4228 | 4228 | ||
| 4229 | void | ||
| 4230 | clear_font_cache (struct frame *f) | ||
| 4231 | { | ||
| 4232 | struct font_driver_list *driver_list = f->font_driver_list; | ||
| 4233 | |||
| 4234 | for (; driver_list; driver_list = driver_list->next) | ||
| 4235 | if (driver_list->on) | ||
| 4236 | { | ||
| 4237 | Lisp_Object val, tmp, cache = driver_list->driver->get_cache (f); | ||
| 4238 | |||
| 4239 | val = XCDR (cache); | ||
| 4240 | while (! NILP (val) | ||
| 4241 | && ! EQ (XCAR (XCAR (val)), driver_list->driver->type)) | ||
| 4242 | val = XCDR (val); | ||
| 4243 | eassert (! NILP (val)); | ||
| 4244 | tmp = XCDR (XCAR (val)); | ||
| 4245 | if (XINT (XCAR (tmp)) == 0) | ||
| 4246 | { | ||
| 4247 | font_clear_cache (f, XCAR (val), driver_list->driver); | ||
| 4248 | XSETCDR (cache, XCDR (val)); | ||
| 4249 | } | ||
| 4250 | } | ||
| 4251 | } | ||
| 4252 | |||
| 4229 | DEFUN ("clear-font-cache", Fclear_font_cache, Sclear_font_cache, 0, 0, 0, | 4253 | DEFUN ("clear-font-cache", Fclear_font_cache, Sclear_font_cache, 0, 0, 0, |
| 4230 | doc: /* Clear font cache. */) | 4254 | doc: /* Clear font cache of each frame. */) |
| 4231 | (void) | 4255 | (void) |
| 4232 | { | 4256 | { |
| 4233 | Lisp_Object list, frame; | 4257 | Lisp_Object list, frame; |
| 4234 | 4258 | ||
| 4235 | FOR_EACH_FRAME (list, frame) | 4259 | FOR_EACH_FRAME (list, frame) |
| 4236 | { | 4260 | clear_font_cache (XFRAME (frame)); |
| 4237 | struct frame *f = XFRAME (frame); | ||
| 4238 | struct font_driver_list *driver_list = f->font_driver_list; | ||
| 4239 | |||
| 4240 | for (; driver_list; driver_list = driver_list->next) | ||
| 4241 | if (driver_list->on) | ||
| 4242 | { | ||
| 4243 | Lisp_Object cache = driver_list->driver->get_cache (f); | ||
| 4244 | Lisp_Object val, tmp; | ||
| 4245 | |||
| 4246 | val = XCDR (cache); | ||
| 4247 | while (! NILP (val) | ||
| 4248 | && ! EQ (XCAR (XCAR (val)), driver_list->driver->type)) | ||
| 4249 | val = XCDR (val); | ||
| 4250 | eassert (! NILP (val)); | ||
| 4251 | tmp = XCDR (XCAR (val)); | ||
| 4252 | if (XINT (XCAR (tmp)) == 0) | ||
| 4253 | { | ||
| 4254 | font_clear_cache (f, XCAR (val), driver_list->driver); | ||
| 4255 | XSETCDR (cache, XCDR (val)); | ||
| 4256 | } | ||
| 4257 | } | ||
| 4258 | } | ||
| 4259 | 4261 | ||
| 4260 | return Qnil; | 4262 | return Qnil; |
| 4261 | } | 4263 | } |
diff --git a/src/font.h b/src/font.h index daeb320c1ab..adb4a582fd8 100644 --- a/src/font.h +++ b/src/font.h | |||
| @@ -760,6 +760,7 @@ extern Lisp_Object font_load_for_lface (struct frame *f, Lisp_Object *lface, | |||
| 760 | Lisp_Object spec); | 760 | Lisp_Object spec); |
| 761 | extern void font_prepare_for_face (struct frame *f, struct face *face); | 761 | extern void font_prepare_for_face (struct frame *f, struct face *face); |
| 762 | extern void font_done_for_face (struct frame *f, struct face *face); | 762 | extern void font_done_for_face (struct frame *f, struct face *face); |
| 763 | extern void clear_font_cache (struct frame *); | ||
| 763 | 764 | ||
| 764 | extern Lisp_Object font_open_by_spec (struct frame *f, Lisp_Object spec); | 765 | extern Lisp_Object font_open_by_spec (struct frame *f, Lisp_Object spec); |
| 765 | extern Lisp_Object font_open_by_name (struct frame *f, Lisp_Object name); | 766 | extern Lisp_Object font_open_by_name (struct frame *f, Lisp_Object name); |
diff --git a/src/window.c b/src/window.c index 82639b6d8ce..7b5b8e4df7a 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -1615,7 +1615,7 @@ overriding motion of point in order to display at this exact start. */) | |||
| 1615 | if (NILP (noforce)) | 1615 | if (NILP (noforce)) |
| 1616 | w->force_start = 1; | 1616 | w->force_start = 1; |
| 1617 | w->update_mode_line = 1; | 1617 | w->update_mode_line = 1; |
| 1618 | if (!EQ (window, selected_window)) | 1618 | if (w != XWINDOW (selected_window)) |
| 1619 | /* Enforce full redisplay. FIXME: make it more selective. */ | 1619 | /* Enforce full redisplay. FIXME: make it more selective. */ |
| 1620 | windows_or_buffers_changed++; | 1620 | windows_or_buffers_changed++; |
| 1621 | 1621 | ||
diff --git a/src/xfaces.c b/src/xfaces.c index acd2d2b1116..b76f9d24180 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -759,11 +759,6 @@ clear_face_cache (int clear_fonts_p) | |||
| 759 | if (clear_fonts_p | 759 | if (clear_fonts_p |
| 760 | || ++clear_font_table_count == CLEAR_FONT_TABLE_COUNT) | 760 | || ++clear_font_table_count == CLEAR_FONT_TABLE_COUNT) |
| 761 | { | 761 | { |
| 762 | #if 0 | ||
| 763 | /* Not yet implemented. */ | ||
| 764 | clear_font_cache (frame); | ||
| 765 | #endif | ||
| 766 | |||
| 767 | /* From time to time see if we can unload some fonts. This also | 762 | /* From time to time see if we can unload some fonts. This also |
| 768 | frees all realized faces on all frames. Fonts needed by | 763 | frees all realized faces on all frames. Fonts needed by |
| 769 | faces will be loaded again when faces are realized again. */ | 764 | faces will be loaded again when faces are realized again. */ |
| @@ -774,7 +769,10 @@ clear_face_cache (int clear_fonts_p) | |||
| 774 | struct frame *f = XFRAME (frame); | 769 | struct frame *f = XFRAME (frame); |
| 775 | if (FRAME_WINDOW_P (f) | 770 | if (FRAME_WINDOW_P (f) |
| 776 | && FRAME_X_DISPLAY_INFO (f)->n_fonts > CLEAR_FONT_TABLE_NFONTS) | 771 | && FRAME_X_DISPLAY_INFO (f)->n_fonts > CLEAR_FONT_TABLE_NFONTS) |
| 777 | free_all_realized_faces (frame); | 772 | { |
| 773 | clear_font_cache (f); | ||
| 774 | free_all_realized_faces (frame); | ||
| 775 | } | ||
| 778 | } | 776 | } |
| 779 | } | 777 | } |
| 780 | else | 778 | else |