all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
Cc: emacs-devel@gnu.org, jasonr@gnu.org, "Kim F. Storm" <storm@cua.dk>
Subject: Re: emacs crashed on windows-xp
Date: Thu, 12 Oct 2006 22:50:54 -0400	[thread overview]
Message-ID: <87mz81vshd.fsf@furball.mit.edu> (raw)
In-Reply-To: <E1GY9CL-0006zU-Uf@fencepost.gnu.org> (Richard Stallman's message of "Thu\, 12 Oct 2006 18\:38\:41 -0400")

Richard Stallman <rms@gnu.org> 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.

  parent reply	other threads:[~2006-10-13  2:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <u3b9vs3d0.fsf@gmail.com>
     [not found] ` <E1GXZXq-00010B-E1@fencepost.gnu.org>
     [not found]   ` <uu02bdxx0.fsf@gmail.com>
     [not found]     ` <E1GXb1L-0006rN-Kp@fencepost.gnu.org>
     [not found]       ` <m23b9vjgrh.fsf@sl392.st-edmunds.cam.ac.uk>
     [not found]         ` <m3ejtf7yh0.fsf@kfs-l.imdomain.dk>
2006-10-11 15:53           ` emacs crashed on windows-xp Jason Rumney
2006-10-11 16:32             ` Jan Djärv
2006-10-12  6:52               ` emacs crashed on many OSes (was: emacs crashed on windows-xp) Jan Djärv
2006-10-12 17:52                 ` Giorgos Keramidas
2006-10-12 19:12                   ` emacs crashed on many OSes Jan D.
2006-10-12 22:43                     ` Giorgos Keramidas
2006-10-12 13:50             ` emacs crashed on windows-xp Kim F. Storm
2006-10-12 14:04             ` Kim F. Storm
2006-10-12 14:57               ` Eli Zaretskii
2006-10-12 15:22               ` Stefan Monnier
2006-10-12 22:38               ` Richard Stallman
2006-10-12 23:11                 ` Kim F. Storm
2006-10-13 11:19                   ` Richard Stallman
2006-10-13  2:50                 ` Chong Yidong [this message]
2006-10-13  8:25                   ` Kim F. Storm
2006-10-13 11:01                   ` Jason Rumney
2006-10-13 15:48                     ` Eli Zaretskii
2006-10-13 16:56                       ` Chong Yidong
2006-10-13 19:08                         ` Eli Zaretskii
2006-10-13 11:19                   ` Richard Stallman
2006-10-13 14:28                     ` Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mz81vshd.fsf@furball.mit.edu \
    --to=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=jasonr@gnu.org \
    --cc=storm@cua.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.