/[emacs]/emacs/src/xdisp.c
ViewVC logotype

Diff of /emacs/src/xdisp.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.923 by rms, Wed Oct 27 14:46:25 2004 UTC revision 1.924 by jhd, Sun Oct 31 15:11:31 2004 UTC
# Line 8416  update_tool_bar (f, save_match_data) Line 8416  update_tool_bar (f, save_match_data)
8416          {          {
8417            struct buffer *prev = current_buffer;            struct buffer *prev = current_buffer;
8418            int count = SPECPDL_INDEX ();            int count = SPECPDL_INDEX ();
8419            Lisp_Object old_tool_bar;            Lisp_Object new_tool_bar;
8420              int new_n_tool_bar;
8421            struct gcpro gcpro1;            struct gcpro gcpro1;
8422    
8423            /* Set current_buffer to the buffer of the selected            /* Set current_buffer to the buffer of the selected
# Line 8435  update_tool_bar (f, save_match_data) Line 8436  update_tool_bar (f, save_match_data)
8436                specbind (Qoverriding_local_map, Qnil);                specbind (Qoverriding_local_map, Qnil);
8437              }              }
8438    
8439            old_tool_bar = f->tool_bar_items;            GCPRO1 (new_tool_bar);
           GCPRO1 (old_tool_bar);  
8440    
8441            /* Build desired tool-bar items from keymaps.  */            /* Build desired tool-bar items from keymaps.  */
8442            BLOCK_INPUT;            new_tool_bar = tool_bar_items (Fcopy_sequence (f->tool_bar_items),
8443            f->tool_bar_items                                           &new_n_tool_bar);
             = tool_bar_items (f->tool_bar_items, &f->n_tool_bar_items);  
           UNBLOCK_INPUT;  
8444    
8445            /* Redisplay the tool-bar if we changed it.  */            /* Redisplay the tool-bar if we changed it.  */
8446            if (! NILP (Fequal (old_tool_bar, f->tool_bar_items)))            if (NILP (Fequal (new_tool_bar, f->tool_bar_items)))
8447              w->update_mode_line = Qt;              {
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                }
8457    
8458            UNGCPRO;            UNGCPRO;
8459    

Legend:
Removed from v.1.923  
changed lines
  Added in v.1.924

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26