/[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.997 by kfstorm, Fri Apr 8 07:45:59 2005 UTC revision 1.998 by rms, Sat Apr 16 18:19:26 2005 UTC
# Line 567  Lisp_Object Vmessage_log_max; Line 567  Lisp_Object Vmessage_log_max;
567    
568  static Lisp_Object Vmessages_buffer_name;  static Lisp_Object Vmessages_buffer_name;
569    
570  /* Current, index 0, and last displayed echo area message.  Either  /* Index 0 is the buffer that holds the current (desired) echo area message,
571     buffers from echo_buffers, or nil to indicate no message.  */     or nil if none is desired right now.
572    
573       Index 1 is the buffer that holds the previously displayed echo area message,
574       or nil to indicate no message.  This is normally what's on the screen now.
575    
576       These two can point to the same buffer.  That happens when the last
577       message output by the user (or made by echoing) has been displayed.  */
578    
579  Lisp_Object echo_area_buffer[2];  Lisp_Object echo_area_buffer[2];
580    
581  /* The buffers referenced from echo_area_buffer.  */  /* Permanent pointers to the two buffers that are used for echo area
582       purposes.  Once the two buffers are made, and their pointers are
583       placed here, these two slots remain unchanged unless those buffers
584       need to be created afresh.  */
585    
586  static Lisp_Object echo_buffer[2];  static Lisp_Object echo_buffer[2];
587    
# Line 7217  ensure_echo_area_buffers () Line 7226  ensure_echo_area_buffers ()
7226     WHICH > 0 means use echo_area_buffer[1].  If that is nil, choose a     WHICH > 0 means use echo_area_buffer[1].  If that is nil, choose a
7227     suitable buffer from echo_buffer[] and clear it.     suitable buffer from echo_buffer[] and clear it.
7228    
    If WHICH < 0, set echo_area_buffer[1] to echo_area_buffer[0], so  
    that the current message becomes the last displayed one, make  
    choose a suitable buffer for echo_area_buffer[0], and clear it.  
   
7229     Value is what FN returns.  */     Value is what FN returns.  */
7230    
7231  static int  static int
# Line 7245  with_echo_area_buffer (w, which, fn, a1, Line 7250  with_echo_area_buffer (w, which, fn, a1,
7250      this_one = 0, the_other = 1;      this_one = 0, the_other = 1;
7251    else if (which > 0)    else if (which > 0)
7252      this_one = 1, the_other = 0;      this_one = 1, the_other = 0;
   else  
     {  
       this_one = 0, the_other = 1;  
       clear_buffer_p = 1;  
   
       /* We need a fresh one in case the current echo buffer equals  
          the one containing the last displayed echo area message.  */  
       if (!NILP (echo_area_buffer[this_one])  
           && EQ (echo_area_buffer[this_one], echo_area_buffer[the_other]))  
         echo_area_buffer[this_one] = Qnil;  
     }  
7253    
7254    /* Choose a suitable buffer from echo_buffer[] is we don't    /* Choose a suitable buffer from echo_buffer[] is we don't
7255       have one.  */       have one.  */
# Line 7875  set_message (s, string, nbytes, multibyt Line 7869  set_message (s, string, nbytes, multibyt
7869      = ((s && multibyte_p)      = ((s && multibyte_p)
7870         || (STRINGP (string) && STRING_MULTIBYTE (string)));         || (STRINGP (string) && STRING_MULTIBYTE (string)));
7871    
7872    with_echo_area_buffer (0, -1, set_message_1,    with_echo_area_buffer (0, 0, set_message_1,
7873                           (EMACS_INT) s, string, nbytes, multibyte_p);                           (EMACS_INT) s, string, nbytes, multibyte_p);
7874    message_buf_print = 0;    message_buf_print = 0;
7875    help_echo_showing_p = 0;    help_echo_showing_p = 0;
# Line 7907  set_message_1 (a1, a2, nbytes, multibyte Line 7901  set_message_1 (a1, a2, nbytes, multibyte
7901    
7902    /* Insert new message at BEG.  */    /* Insert new message at BEG.  */
7903    TEMP_SET_PT_BOTH (BEG, BEG_BYTE);    TEMP_SET_PT_BOTH (BEG, BEG_BYTE);
7904      Ferase_buffer ();
7905    
7906    if (STRINGP (string))    if (STRINGP (string))
7907      {      {
# Line 8123  echo_area_display (update_frame_p) Line 8118  echo_area_display (update_frame_p)
8118    else if (!EQ (mini_window, selected_window))    else if (!EQ (mini_window, selected_window))
8119      windows_or_buffers_changed++;      windows_or_buffers_changed++;
8120    
8121    /* Last displayed message is now the current message.  */    /* The current message is now also the last one displayed.  */
8122    echo_area_buffer[1] = echo_area_buffer[0];    echo_area_buffer[1] = echo_area_buffer[0];
   /* Inform read_char that we're not echoing.  */  
   echo_message_buffer = Qnil;  
8123    
8124    /* Prevent redisplay optimization in redisplay_internal by resetting    /* Prevent redisplay optimization in redisplay_internal by resetting
8125       this_line_start_pos.  This is done because the mini-buffer now       this_line_start_pos.  This is done because the mini-buffer now

Legend:
Removed from v.1.997  
changed lines
  Added in v.1.998

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