emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs crashed on windows-xp


From: Chong Yidong
Subject: Re: emacs crashed on windows-xp
Date: Thu, 12 Oct 2006 22:50:54 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Richard Stallman <address@hidden> writes:

> Making the frame title depend on the way the window was displayed is a
> somewhat strange thing to do.
>
> I think it might be best to disable the use of %l and %c in frame
> titles.

How about this patch?  I can update the Lisp reference manual too.

*** emacs/src/xdisp.c.~1.1124.~ 2006-10-07 12:11:06.000000000 -0400
--- emacs/src/xdisp.c   2006-10-12 22:47:25.000000000 -0400
***************
*** 17680,17691 ****
        break;
  
      case 'c':
!       {
!       int col = (int) current_column (); /* iftc */
!       w->column_number_displayed = make_number (col);
!       pint2str (decode_mode_spec_buf, field_width, col);
!       return decode_mode_spec_buf;
!       }
  
      case 'e':
  #ifndef SYSTEM_MALLOC
--- 17680,17699 ----
        break;
  
      case 'c':
!       /* %c and %l are ignored in `frame-title-format'.
!          (In redisplay_internal, the frame title is drawn _before_ the
!          windows are updated, so the stuff which depends on actual
!          window contents (such as %l) may fail to render properly, or
!          even crash emacs.)  */
!       if (mode_line_target == MODE_LINE_TITLE)
!       return "";
!       else
!       {
!         int col = (int) current_column (); /* iftc */
!         w->column_number_displayed = make_number (col);
!         pint2str (decode_mode_spec_buf, field_width, col);
!         return decode_mode_spec_buf;
!       }
  
      case 'e':
  #ifndef SYSTEM_MALLOC
***************
*** 17727,17737 ****
  
      case 'l':
        {
!       int startpos = XMARKER (w->start)->charpos;
!       int startpos_byte = marker_byte_position (w->start);
!       int line, linepos, linepos_byte, topline;
!       int nlines, junk;
!       int height = WINDOW_TOTAL_LINES (w);
  
        /* If we decided that this buffer isn't suitable for line numbers,
           don't forget that too fast.  */
--- 17735,17750 ----
  
      case 'l':
        {
!       int startpos, startpos_byte, line, linepos, linepos_byte;
!       int topline, nlines, junk, height;
! 
!       /* %c and %l are ignored in `frame-title-format'.  */
!       if (mode_line_target == MODE_LINE_TITLE)
!         return "";
! 
!       startpos = XMARKER (w->start)->charpos;
!       startpos_byte = marker_byte_position (w->start);
!       height = WINDOW_TOTAL_LINES (w);
  
        /* If we decided that this buffer isn't suitable for line numbers,
           don't forget that too fast.  */
***************
*** 23986,23994 ****
    DEFVAR_LISP ("frame-title-format", &Vframe_title_format,
      doc: /* Template for displaying the title bar of visible frames.
  \(Assuming the window manager supports this feature.)
! This variable has the same structure as `mode-line-format' (which see),
! and is used only on frames for which no explicit name has been set
! \(see `modify-frame-parameters').  */);
  
    DEFVAR_LISP ("icon-title-format", &Vicon_title_format,
      doc: /* Template for displaying the title bar of an iconified frame.
--- 23999,24008 ----
    DEFVAR_LISP ("frame-title-format", &Vframe_title_format,
      doc: /* Template for displaying the title bar of visible frames.
  \(Assuming the window manager supports this feature.)
! 
! This variable has the same structure as `mode-line-format', except that
! the %c and %l constructs are ignored.  It is used only on frames for
! which no explicit name has been set \(see `modify-frame-parameters').  */);
  
    DEFVAR_LISP ("icon-title-format", &Vicon_title_format,
      doc: /* Template for displaying the title bar of an iconified frame.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]