diff options
| author | Karoly Lorentey | 2006-10-14 16:56:21 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2006-10-14 16:56:21 +0000 |
| commit | 3f87f67ee215ffeecbd2f53bd7f342cdf03f47df (patch) | |
| tree | 16f2af9111af08a94d608d96a957f5c3ec5effcc /src/xdisp.c | |
| parent | 350e4fb815d7413ef6d339dd664014706f742927 (diff) | |
| parent | 7a210b69c7f92650c524766d1b9d3f3eefdd67c7 (diff) | |
| download | emacs-3f87f67ee215ffeecbd2f53bd7f342cdf03f47df.tar.gz emacs-3f87f67ee215ffeecbd2f53bd7f342cdf03f47df.zip | |
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-371
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-372
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-373
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-374
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-375
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-376
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-377
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-378
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-379
Merge from erc--emacs--21
* emacs@sv.gnu.org/emacs--devo--0--patch-380
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-381
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-382
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-383
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-384
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-385
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-386
Update from erc--emacs--22
* emacs@sv.gnu.org/emacs--devo--0--patch-387
Fix ERC bug introduced in last patch
* emacs@sv.gnu.org/emacs--devo--0--patch-388
Update from erc--emacs--22
* emacs@sv.gnu.org/emacs--devo--0--patch-389
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-390
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-391
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-392
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-393
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-394
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-395
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-396
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-397
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-398
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-399
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-400
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-401
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-402
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-403
Rcirc update from Ryan Yeske
* emacs@sv.gnu.org/emacs--devo--0--patch-404
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-405
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-406
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-407
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-408
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-409
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-410
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-411
Miscellaneous tq-related fixes.
* emacs@sv.gnu.org/emacs--devo--0--patch-412
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-121
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-122
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-123
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-124
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-125
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-126
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-127
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-581
Diffstat (limited to 'src/xdisp.c')
| -rw-r--r-- | src/xdisp.c | 62 |
1 files changed, 45 insertions, 17 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 76ab430386c..7e65b91fd13 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -701,6 +701,10 @@ Lisp_Object Vresize_mini_windows; | |||
| 701 | 701 | ||
| 702 | struct buffer *displayed_buffer; | 702 | struct buffer *displayed_buffer; |
| 703 | 703 | ||
| 704 | /* Space between overline and text. */ | ||
| 705 | |||
| 706 | EMACS_INT overline_margin; | ||
| 707 | |||
| 704 | /* Value returned from text property handlers (see below). */ | 708 | /* Value returned from text property handlers (see below). */ |
| 705 | 709 | ||
| 706 | enum prop_handled | 710 | enum prop_handled |
| @@ -887,7 +891,7 @@ static void redisplay_window P_ ((Lisp_Object, int)); | |||
| 887 | static Lisp_Object redisplay_window_error (); | 891 | static Lisp_Object redisplay_window_error (); |
| 888 | static Lisp_Object redisplay_window_0 P_ ((Lisp_Object)); | 892 | static Lisp_Object redisplay_window_0 P_ ((Lisp_Object)); |
| 889 | static Lisp_Object redisplay_window_1 P_ ((Lisp_Object)); | 893 | static Lisp_Object redisplay_window_1 P_ ((Lisp_Object)); |
| 890 | static void update_menu_bar P_ ((struct frame *, int)); | 894 | static int update_menu_bar P_ ((struct frame *, int, int)); |
| 891 | static int try_window_reusing_current_matrix P_ ((struct window *)); | 895 | static int try_window_reusing_current_matrix P_ ((struct window *)); |
| 892 | static int try_window_id P_ ((struct window *)); | 896 | static int try_window_id P_ ((struct window *)); |
| 893 | static int display_line P_ ((struct it *)); | 897 | static int display_line P_ ((struct it *)); |
| @@ -9038,6 +9042,9 @@ prepare_menu_bars () | |||
| 9038 | { | 9042 | { |
| 9039 | Lisp_Object tail, frame; | 9043 | Lisp_Object tail, frame; |
| 9040 | int count = SPECPDL_INDEX (); | 9044 | int count = SPECPDL_INDEX (); |
| 9045 | /* 1 means that update_menu_bar has run its hooks | ||
| 9046 | so any further calls to update_menu_bar shouldn't do so again. */ | ||
| 9047 | int menu_bar_hooks_run = 0; | ||
| 9041 | 9048 | ||
| 9042 | record_unwind_save_match_data (); | 9049 | record_unwind_save_match_data (); |
| 9043 | 9050 | ||
| @@ -9069,7 +9076,7 @@ prepare_menu_bars () | |||
| 9069 | } | 9076 | } |
| 9070 | 9077 | ||
| 9071 | GCPRO1 (tail); | 9078 | GCPRO1 (tail); |
| 9072 | update_menu_bar (f, 0); | 9079 | menu_bar_hooks_run = update_menu_bar (f, 0, menu_bar_hooks_run); |
| 9073 | #ifdef HAVE_WINDOW_SYSTEM | 9080 | #ifdef HAVE_WINDOW_SYSTEM |
| 9074 | update_tool_bar (f, 0); | 9081 | update_tool_bar (f, 0); |
| 9075 | #ifdef MAC_OS | 9082 | #ifdef MAC_OS |
| @@ -9084,7 +9091,7 @@ prepare_menu_bars () | |||
| 9084 | else | 9091 | else |
| 9085 | { | 9092 | { |
| 9086 | struct frame *sf = SELECTED_FRAME (); | 9093 | struct frame *sf = SELECTED_FRAME (); |
| 9087 | update_menu_bar (sf, 1); | 9094 | update_menu_bar (sf, 1, 0); |
| 9088 | #ifdef HAVE_WINDOW_SYSTEM | 9095 | #ifdef HAVE_WINDOW_SYSTEM |
| 9089 | update_tool_bar (sf, 1); | 9096 | update_tool_bar (sf, 1); |
| 9090 | #ifdef MAC_OS | 9097 | #ifdef MAC_OS |
| @@ -9105,12 +9112,18 @@ prepare_menu_bars () | |||
| 9105 | before we start to fill in any display lines, because it can call | 9112 | before we start to fill in any display lines, because it can call |
| 9106 | eval. | 9113 | eval. |
| 9107 | 9114 | ||
| 9108 | If SAVE_MATCH_DATA is non-zero, we must save and restore it here. */ | 9115 | If SAVE_MATCH_DATA is non-zero, we must save and restore it here. |
| 9109 | 9116 | ||
| 9110 | static void | 9117 | If HOOKS_RUN is 1, that means a previous call to update_menu_bar |
| 9111 | update_menu_bar (f, save_match_data) | 9118 | already ran the menu bar hooks for this redisplay, so there |
| 9119 | is no need to run them again. The return value is the | ||
| 9120 | updated value of this flag, to pass to the next call. */ | ||
| 9121 | |||
| 9122 | static int | ||
| 9123 | update_menu_bar (f, save_match_data, hooks_run) | ||
| 9112 | struct frame *f; | 9124 | struct frame *f; |
| 9113 | int save_match_data; | 9125 | int save_match_data; |
| 9126 | int hooks_run; | ||
| 9114 | { | 9127 | { |
| 9115 | Lisp_Object window; | 9128 | Lisp_Object window; |
| 9116 | register struct window *w; | 9129 | register struct window *w; |
| @@ -9175,15 +9188,21 @@ update_menu_bar (f, save_match_data) | |||
| 9175 | specbind (Qoverriding_local_map, Qnil); | 9188 | specbind (Qoverriding_local_map, Qnil); |
| 9176 | } | 9189 | } |
| 9177 | 9190 | ||
| 9178 | /* Run the Lucid hook. */ | 9191 | if (!hooks_run) |
| 9179 | safe_run_hooks (Qactivate_menubar_hook); | 9192 | { |
| 9193 | /* Run the Lucid hook. */ | ||
| 9194 | safe_run_hooks (Qactivate_menubar_hook); | ||
| 9180 | 9195 | ||
| 9181 | /* If it has changed current-menubar from previous value, | 9196 | /* If it has changed current-menubar from previous value, |
| 9182 | really recompute the menu-bar from the value. */ | 9197 | really recompute the menu-bar from the value. */ |
| 9183 | if (! NILP (Vlucid_menu_bar_dirty_flag)) | 9198 | if (! NILP (Vlucid_menu_bar_dirty_flag)) |
| 9184 | call0 (Qrecompute_lucid_menubar); | 9199 | call0 (Qrecompute_lucid_menubar); |
| 9200 | |||
| 9201 | safe_run_hooks (Qmenu_bar_update_hook); | ||
| 9202 | |||
| 9203 | hooks_run = 1; | ||
| 9204 | } | ||
| 9185 | 9205 | ||
| 9186 | safe_run_hooks (Qmenu_bar_update_hook); | ||
| 9187 | FRAME_MENU_BAR_ITEMS (f) = menu_bar_items (FRAME_MENU_BAR_ITEMS (f)); | 9206 | FRAME_MENU_BAR_ITEMS (f) = menu_bar_items (FRAME_MENU_BAR_ITEMS (f)); |
| 9188 | 9207 | ||
| 9189 | /* Redisplay the menu bar in case we changed it. */ | 9208 | /* Redisplay the menu bar in case we changed it. */ |
| @@ -9212,6 +9231,8 @@ update_menu_bar (f, save_match_data) | |||
| 9212 | set_buffer_internal_1 (prev); | 9231 | set_buffer_internal_1 (prev); |
| 9213 | } | 9232 | } |
| 9214 | } | 9233 | } |
| 9234 | |||
| 9235 | return hooks_run; | ||
| 9215 | } | 9236 | } |
| 9216 | 9237 | ||
| 9217 | 9238 | ||
| @@ -9376,7 +9397,8 @@ update_tool_bar (f, save_match_data) | |||
| 9376 | &new_n_tool_bar); | 9397 | &new_n_tool_bar); |
| 9377 | 9398 | ||
| 9378 | /* Redisplay the tool-bar if we changed it. */ | 9399 | /* Redisplay the tool-bar if we changed it. */ |
| 9379 | if (NILP (Fequal (new_tool_bar, f->tool_bar_items))) | 9400 | if (new_n_tool_bar != f->n_tool_bar_items |
| 9401 | || NILP (Fequal (new_tool_bar, f->tool_bar_items))) | ||
| 9380 | { | 9402 | { |
| 9381 | /* Redisplay that happens asynchronously due to an expose event | 9403 | /* Redisplay that happens asynchronously due to an expose event |
| 9382 | may access f->tool_bar_items. Make sure we update both | 9404 | may access f->tool_bar_items. Make sure we update both |
| @@ -20354,7 +20376,7 @@ x_produce_glyphs (it) | |||
| 20354 | /* If face has an overline, add the height of the overline | 20376 | /* If face has an overline, add the height of the overline |
| 20355 | (1 pixel) and a 1 pixel margin to the character height. */ | 20377 | (1 pixel) and a 1 pixel margin to the character height. */ |
| 20356 | if (face->overline_p) | 20378 | if (face->overline_p) |
| 20357 | it->ascent += 2; | 20379 | it->ascent += overline_margin; |
| 20358 | 20380 | ||
| 20359 | if (it->constrain_row_ascent_descent_p) | 20381 | if (it->constrain_row_ascent_descent_p) |
| 20360 | { | 20382 | { |
| @@ -20556,7 +20578,7 @@ x_produce_glyphs (it) | |||
| 20556 | /* If face has an overline, add the height of the overline | 20578 | /* If face has an overline, add the height of the overline |
| 20557 | (1 pixel) and a 1 pixel margin to the character height. */ | 20579 | (1 pixel) and a 1 pixel margin to the character height. */ |
| 20558 | if (face->overline_p) | 20580 | if (face->overline_p) |
| 20559 | it->ascent += 2; | 20581 | it->ascent += overline_margin; |
| 20560 | 20582 | ||
| 20561 | take_vertical_position_into_account (it); | 20583 | take_vertical_position_into_account (it); |
| 20562 | 20584 | ||
| @@ -20831,7 +20853,7 @@ x_produce_glyphs (it) | |||
| 20831 | /* If face has an overline, add the height of the overline | 20853 | /* If face has an overline, add the height of the overline |
| 20832 | (1 pixel) and a 1 pixel margin to the character height. */ | 20854 | (1 pixel) and a 1 pixel margin to the character height. */ |
| 20833 | if (face->overline_p) | 20855 | if (face->overline_p) |
| 20834 | it->ascent += 2; | 20856 | it->ascent += overline_margin; |
| 20835 | 20857 | ||
| 20836 | take_vertical_position_into_account (it); | 20858 | take_vertical_position_into_account (it); |
| 20837 | 20859 | ||
| @@ -24108,6 +24130,12 @@ whose contents depend on various data. */); | |||
| 24108 | doc: /* Inhibit try_cursor_movement display optimization. */); | 24130 | doc: /* Inhibit try_cursor_movement display optimization. */); |
| 24109 | inhibit_try_cursor_movement = 0; | 24131 | inhibit_try_cursor_movement = 0; |
| 24110 | #endif /* GLYPH_DEBUG */ | 24132 | #endif /* GLYPH_DEBUG */ |
| 24133 | |||
| 24134 | DEFVAR_INT ("overline-margin", &overline_margin, | ||
| 24135 | doc: /* *Space between overline and text, in pixels. | ||
| 24136 | The default value is 2: the height of the overline (1 pixel) plus 1 pixel | ||
| 24137 | margin to the caracter height. */); | ||
| 24138 | overline_margin = 2; | ||
| 24111 | } | 24139 | } |
| 24112 | 24140 | ||
| 24113 | 24141 | ||