From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: emacs crashed on windows-xp Date: Thu, 12 Oct 2006 22:50:54 -0400 Message-ID: <87mz81vshd.fsf@furball.mit.edu> References: <452D1379.7010307@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1160708236 9902 80.91.229.2 (13 Oct 2006 02:57:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 13 Oct 2006 02:57:16 +0000 (UTC) Cc: emacs-devel@gnu.org, jasonr@gnu.org, "Kim F. Storm" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 13 04:57:14 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GYDEM-0001pq-OL for ged-emacs-devel@m.gmane.org; Fri, 13 Oct 2006 04:57:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GYDEM-0007Dt-7g for ged-emacs-devel@m.gmane.org; Thu, 12 Oct 2006 22:57:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GYDE7-0007DY-My for emacs-devel@gnu.org; Thu, 12 Oct 2006 22:56:47 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GYDE7-0007DK-1v for emacs-devel@gnu.org; Thu, 12 Oct 2006 22:56:47 -0400 Original-Received: from [18.72.1.2] (helo=south-station-annex.mit.edu) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GYDMT-0000zW-2K; Thu, 12 Oct 2006 23:05:25 -0400 Original-Received: from grand-central-station.mit.edu (GRAND-CENTRAL-STATION.MIT.EDU [18.7.21.82]) by south-station-annex.mit.edu (8.13.6/8.9.2) with ESMTP id k9D2ugIu016149; Thu, 12 Oct 2006 22:56:43 -0400 (EDT) Original-Received: from outgoing-legacy.mit.edu (OUTGOING-LEGACY.MIT.EDU [18.7.22.104]) by grand-central-station.mit.edu (8.13.6/8.9.2) with ESMTP id k9D2p1AI011060; Thu, 12 Oct 2006 22:51:01 -0400 (EDT) Original-Received: from furball.mit.edu (SYDNEYPACIFIC-ONE-TWENTY-ONE.MIT.EDU [18.95.5.121]) ) by outgoing-legacy.mit.edu (8.13.6/8.12.4) with ESMTP id k9D2orwD004262; Thu, 12 Oct 2006 22:50:54 -0400 (EDT) Original-Received: from cyd by furball.mit.edu with local (Exim 3.36 #1 (Debian)) id 1GYD8Q-0000ua-00; Thu, 12 Oct 2006 22:50:54 -0400 Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Thu\, 12 Oct 2006 18\:38\:41 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-Spam-Score: 1.217 X-Scanned-By: MIMEDefang 2.42 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:60697 Archived-At: Richard Stallman 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.