/[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.706 by gerd, Sat Nov 17 10:46:24 2001 UTC revision 1.707 by rms, Sun Nov 18 06:54:50 2001 UTC
# Line 291  int noninteractive_need_newline; Line 291  int noninteractive_need_newline;
291    
292  static int message_log_need_newline;  static int message_log_need_newline;
293    
294    /* Three markers that message_dolog uses.
295       It could allocate them itself, but that causes trouble
296       in handling memory-full errors.  */
297    static Lisp_Object message_dolog_marker1;
298    static Lisp_Object message_dolog_marker2;
299    static Lisp_Object message_dolog_marker3;
300    
301  /* The buffer position of the first character appearing entirely or  /* The buffer position of the first character appearing entirely or
302     partially on the line of the selected window which contains the     partially on the line of the selected window which contains the
# Line 5616  message_dolog (m, nbytes, nlflag, multib Line 5622  message_dolog (m, nbytes, nlflag, multib
5622        Fset_buffer (Fget_buffer_create (Vmessages_buffer_name));        Fset_buffer (Fget_buffer_create (Vmessages_buffer_name));
5623        current_buffer->undo_list = Qt;        current_buffer->undo_list = Qt;
5624    
5625        oldpoint = Fpoint_marker ();        oldpoint = message_dolog_marker1;
5626        oldbegv = Fpoint_min_marker ();        set_marker_restricted (oldpoint, make_number (PT), Qnil);
5627        oldzv = Fpoint_max_marker ();        oldbegv = message_dolog_marker2;
5628        GCPRO4 (oldpoint, oldbegv, oldzv, old_deactivate_mark);        set_marker_restricted (oldbegv, make_number (BEGV), Qnil);
5629          oldzv = message_dolog_marker3;
5630          set_marker_restricted (oldzv, make_number (ZV), Qnil);
5631          GCPRO1 (old_deactivate_mark);
5632    
5633        if (PT == Z)        if (PT == Z)
5634          point_at_end = 1;          point_at_end = 1;
# Line 5678  message_dolog (m, nbytes, nlflag, multib Line 5687  message_dolog (m, nbytes, nlflag, multib
5687            this_bol = PT;            this_bol = PT;
5688            this_bol_byte = PT_BYTE;            this_bol_byte = PT_BYTE;
5689    
5690              /* See if this line duplicates the previous one.
5691                 If so, combine duplicates.  */
5692            if (this_bol > BEG)            if (this_bol > BEG)
5693              {              {
5694                scan_newline (PT, PT_BYTE, BEG, BEG_BYTE, -2, 0);                scan_newline (PT, PT_BYTE, BEG, BEG_BYTE, -2, 0);
# Line 5705  message_dolog (m, nbytes, nlflag, multib Line 5716  message_dolog (m, nbytes, nlflag, multib
5716                  }                  }
5717              }              }
5718    
5719              /* If we have more than the desired maximum number of lines
5720                 in the *Messages* buffer now, delete the oldest ones.
5721                 This is safe because we don't have undo in this buffer.  */
5722    
5723            if (NATNUMP (Vmessage_log_max))            if (NATNUMP (Vmessage_log_max))
5724              {              {
5725                scan_newline (Z, Z_BYTE, BEG, BEG_BYTE,                scan_newline (Z, Z_BYTE, BEG, BEG_BYTE,
# Line 5735  message_dolog (m, nbytes, nlflag, multib Line 5750  message_dolog (m, nbytes, nlflag, multib
5750                            XMARKER (oldpoint)->bytepos);                            XMARKER (oldpoint)->bytepos);
5751    
5752        UNGCPRO;        UNGCPRO;
5753        free_marker (oldpoint);        unchain_marker (oldpoint);
5754        free_marker (oldbegv);        unchain_marker (oldbegv);
5755        free_marker (oldzv);        unchain_marker (oldzv);
5756    
5757        tem = Fget_buffer_window (Fcurrent_buffer (), Qt);        tem = Fget_buffer_window (Fcurrent_buffer (), Qt);
5758        set_buffer_internal (oldbuf);        set_buffer_internal (oldbuf);
# Line 14590  syms_of_xdisp () Line 14605  syms_of_xdisp ()
14605    Qinhibit_redisplay = intern ("inhibit-redisplay");    Qinhibit_redisplay = intern ("inhibit-redisplay");
14606    staticpro (&Qinhibit_redisplay);    staticpro (&Qinhibit_redisplay);
14607    
14608      message_dolog_marker1 = Fmake_marker ();
14609      staticpro (&message_dolog_marker1);
14610      message_dolog_marker2 = Fmake_marker ();
14611      staticpro (&message_dolog_marker2);
14612      message_dolog_marker3 = Fmake_marker ();
14613      staticpro (&message_dolog_marker3);
14614    
14615  #if GLYPH_DEBUG  #if GLYPH_DEBUG
14616    defsubr (&Sdump_glyph_matrix);    defsubr (&Sdump_glyph_matrix);
14617    defsubr (&Sdump_glyph_row);    defsubr (&Sdump_glyph_row);

Legend:
Removed from v.1.706  
changed lines
  Added in v.1.707

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