aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Djärv2004-10-31 15:11:31 +0000
committerJan Djärv2004-10-31 15:11:31 +0000
commit12e6566a256a5c18a018645e6cbd461eb8662e62 (patch)
tree4bdaef28c6d1960bcbfee5a16ff220aee5caa199 /src
parentfcdb28b473b74bd2a2d79675280764d3abde0659 (diff)
downloademacs-12e6566a256a5c18a018645e6cbd461eb8662e62.tar.gz
emacs-12e6566a256a5c18a018645e6cbd461eb8662e62.zip
* xdisp.c (update_tool_bar): Pass a copy of f->tool_bar_items to
tool_bar_items and assign the result to f->tool_bar_items if not equal. Move BLOCK/UNBLOCK_INPUT from around call to tool_bar_items to assignment of result.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xdisp.c25
2 files changed, 21 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 8de855df2e3..76a6676a0cf 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
12004-10-31 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 12004-10-31 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2 2
3 * xdisp.c (update_tool_bar): Pass a copy of f->tool_bar_items to
4 tool_bar_items and assign the result to f->tool_bar_items if
5 not equal. Move BLOCK/UNBLOCK_INPUT from around call to
6 tool_bar_items to assignment of result.
7
3 * atimer.c (alarm_signal_handler): Do not call set_alarm if 8 * atimer.c (alarm_signal_handler): Do not call set_alarm if
4 pending_atmers is non-zero. 9 pending_atmers is non-zero.
5 10
diff --git a/src/xdisp.c b/src/xdisp.c
index df68ab80eff..dfb2e8198a5 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -8416,7 +8416,8 @@ update_tool_bar (f, save_match_data)
8416 { 8416 {
8417 struct buffer *prev = current_buffer; 8417 struct buffer *prev = current_buffer;
8418 int count = SPECPDL_INDEX (); 8418 int count = SPECPDL_INDEX ();
8419 Lisp_Object old_tool_bar; 8419 Lisp_Object new_tool_bar;
8420 int new_n_tool_bar;
8420 struct gcpro gcpro1; 8421 struct gcpro gcpro1;
8421 8422
8422 /* Set current_buffer to the buffer of the selected 8423 /* Set current_buffer to the buffer of the selected
@@ -8435,18 +8436,24 @@ update_tool_bar (f, save_match_data)
8435 specbind (Qoverriding_local_map, Qnil); 8436 specbind (Qoverriding_local_map, Qnil);
8436 } 8437 }
8437 8438
8438 old_tool_bar = f->tool_bar_items; 8439 GCPRO1 (new_tool_bar);
8439 GCPRO1 (old_tool_bar);
8440 8440
8441 /* Build desired tool-bar items from keymaps. */ 8441 /* Build desired tool-bar items from keymaps. */
8442 BLOCK_INPUT; 8442 new_tool_bar = tool_bar_items (Fcopy_sequence (f->tool_bar_items),
8443 f->tool_bar_items 8443 &new_n_tool_bar);
8444 = tool_bar_items (f->tool_bar_items, &f->n_tool_bar_items);
8445 UNBLOCK_INPUT;
8446 8444
8447 /* Redisplay the tool-bar if we changed it. */ 8445 /* Redisplay the tool-bar if we changed it. */
8448 if (! NILP (Fequal (old_tool_bar, f->tool_bar_items))) 8446 if (NILP (Fequal (new_tool_bar, f->tool_bar_items)))
8449 w->update_mode_line = Qt; 8447 {
8448 /* Redisplay that happens asynchronously due to an expose event
8449 may access f->tool_bar_items. Make sure we update both
8450 variables within BLOCK_INPUT so no such event interrupts. */
8451 BLOCK_INPUT;
8452 f->tool_bar_items = new_tool_bar;
8453 f->n_tool_bar_items = new_n_tool_bar;
8454 w->update_mode_line = Qt;
8455 UNBLOCK_INPUT;
8456 }
8450 8457
8451 UNGCPRO; 8458 UNGCPRO;
8452 8459