diff options
| author | Chong Yidong | 2006-10-13 14:18:09 +0000 |
|---|---|---|
| committer | Chong Yidong | 2006-10-13 14:18:09 +0000 |
| commit | 98721beb4bda354157e8de104ed2154fb1d46368 (patch) | |
| tree | 8d6971216a15cf3101fa9a5078088bb45053fe72 /src | |
| parent | 43621386759eb1348931e18100b74322ff610c42 (diff) | |
| download | emacs-98721beb4bda354157e8de104ed2154fb1d46368.tar.gz emacs-98721beb4bda354157e8de104ed2154fb1d46368.zip | |
* xdisp.c (decode_mode_spec): Ignore %c and %l constructs in frame
title.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/xdisp.c | 42 |
2 files changed, 33 insertions, 14 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 30cae45ba84..f86c4c6a21c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2006-10-13 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * xdisp.c (decode_mode_spec): Ignore %c and %l constructs in frame | ||
| 4 | title. | ||
| 5 | |||
| 1 | 2006-10-12 Chong Yidong <cyd@stupidchicken.com> | 6 | 2006-10-12 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 7 | ||
| 3 | * keymap.c (Fkey_binding): Check Lisp_Object types before doing | 8 | * keymap.c (Fkey_binding): Check Lisp_Object types before doing |
diff --git a/src/xdisp.c b/src/xdisp.c index 84e585bbd1e..5c017ad70c2 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -17680,12 +17680,20 @@ decode_mode_spec (w, c, field_width, precision, multibyte) | |||
| 17680 | break; | 17680 | break; |
| 17681 | 17681 | ||
| 17682 | case 'c': | 17682 | case 'c': |
| 17683 | { | 17683 | /* %c and %l are ignored in `frame-title-format'. |
| 17684 | int col = (int) current_column (); /* iftc */ | 17684 | (In redisplay_internal, the frame title is drawn _before_ the |
| 17685 | w->column_number_displayed = make_number (col); | 17685 | windows are updated, so the stuff which depends on actual |
| 17686 | pint2str (decode_mode_spec_buf, field_width, col); | 17686 | window contents (such as %l) may fail to render properly, or |
| 17687 | return decode_mode_spec_buf; | 17687 | even crash emacs.) */ |
| 17688 | } | 17688 | if (mode_line_target == MODE_LINE_TITLE) |
| 17689 | return ""; | ||
| 17690 | else | ||
| 17691 | { | ||
| 17692 | int col = (int) current_column (); /* iftc */ | ||
| 17693 | w->column_number_displayed = make_number (col); | ||
| 17694 | pint2str (decode_mode_spec_buf, field_width, col); | ||
| 17695 | return decode_mode_spec_buf; | ||
| 17696 | } | ||
| 17689 | 17697 | ||
| 17690 | case 'e': | 17698 | case 'e': |
| 17691 | #ifndef SYSTEM_MALLOC | 17699 | #ifndef SYSTEM_MALLOC |
| @@ -17727,11 +17735,16 @@ decode_mode_spec (w, c, field_width, precision, multibyte) | |||
| 17727 | 17735 | ||
| 17728 | case 'l': | 17736 | case 'l': |
| 17729 | { | 17737 | { |
| 17730 | int startpos = XMARKER (w->start)->charpos; | 17738 | int startpos, startpos_byte, line, linepos, linepos_byte; |
| 17731 | int startpos_byte = marker_byte_position (w->start); | 17739 | int topline, nlines, junk, height; |
| 17732 | int line, linepos, linepos_byte, topline; | 17740 | |
| 17733 | int nlines, junk; | 17741 | /* %c and %l are ignored in `frame-title-format'. */ |
| 17734 | int height = WINDOW_TOTAL_LINES (w); | 17742 | if (mode_line_target == MODE_LINE_TITLE) |
| 17743 | return ""; | ||
| 17744 | |||
| 17745 | startpos = XMARKER (w->start)->charpos; | ||
| 17746 | startpos_byte = marker_byte_position (w->start); | ||
| 17747 | height = WINDOW_TOTAL_LINES (w); | ||
| 17735 | 17748 | ||
| 17736 | /* If we decided that this buffer isn't suitable for line numbers, | 17749 | /* If we decided that this buffer isn't suitable for line numbers, |
| 17737 | don't forget that too fast. */ | 17750 | don't forget that too fast. */ |
| @@ -23986,9 +23999,10 @@ This variable is not guaranteed to be accurate except while processing | |||
| 23986 | DEFVAR_LISP ("frame-title-format", &Vframe_title_format, | 23999 | DEFVAR_LISP ("frame-title-format", &Vframe_title_format, |
| 23987 | doc: /* Template for displaying the title bar of visible frames. | 24000 | doc: /* Template for displaying the title bar of visible frames. |
| 23988 | \(Assuming the window manager supports this feature.) | 24001 | \(Assuming the window manager supports this feature.) |
| 23989 | This variable has the same structure as `mode-line-format' (which see), | 24002 | |
| 23990 | and is used only on frames for which no explicit name has been set | 24003 | This variable has the same structure as `mode-line-format', except that |
| 23991 | \(see `modify-frame-parameters'). */); | 24004 | the %c and %l constructs are ignored. It is used only on frames for |
| 24005 | which no explicit name has been set \(see `modify-frame-parameters'). */); | ||
| 23992 | 24006 | ||
| 23993 | DEFVAR_LISP ("icon-title-format", &Vicon_title_format, | 24007 | DEFVAR_LISP ("icon-title-format", &Vicon_title_format, |
| 23994 | doc: /* Template for displaying the title bar of an iconified frame. | 24008 | doc: /* Template for displaying the title bar of an iconified frame. |