aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman2004-09-09 01:30:38 +0000
committerRichard M. Stallman2004-09-09 01:30:38 +0000
commit5670531ed8ded2708eeeffaf37aaa7cdb0015223 (patch)
tree656164937d91927eabad395e415b7fab088ecf73 /src
parenta13cf3bc9ac851707b6a776b402347841b949578 (diff)
downloademacs-5670531ed8ded2708eeeffaf37aaa7cdb0015223.tar.gz
emacs-5670531ed8ded2708eeeffaf37aaa7cdb0015223.zip
(Fformat_mode_line): New arg BUFFER says which buffer to use.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/xdisp.c19
2 files changed, 16 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index aa8bf90c906..57f51c64341 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12004-09-08 Richard M. Stallman <rms@gnu.org>
2
3 * xdisp.c (Fformat_mode_line): New arg BUFFER says which buffer to use.
4
12004-09-08 Dan Nicolaescu <dann@ics.uci.edu> 52004-09-08 Dan Nicolaescu <dann@ics.uci.edu>
2 6
3 * minibuf.c (history_delete_duplicates): New variable. 7 * minibuf.c (history_delete_duplicates): New variable.
diff --git a/src/xdisp.c b/src/xdisp.c
index bae84d548c0..45388409fd4 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -15794,15 +15794,16 @@ store_mode_line_string (string, lisp_string, copy_string, field_width, precision
15794 15794
15795 15795
15796DEFUN ("format-mode-line", Fformat_mode_line, Sformat_mode_line, 15796DEFUN ("format-mode-line", Fformat_mode_line, Sformat_mode_line,
15797 0, 3, 0, 15797 0, 4, 0,
15798 doc: /* Return the mode-line of selected window as a string. 15798 doc: /* Return the mode-line of selected window as a string.
15799First optional arg FORMAT specifies a different format string (see 15799First optional arg FORMAT specifies a different format string (see
15800`mode-line-format' for details) to use. If FORMAT is t, return 15800`mode-line-format' for details) to use. If FORMAT is t, return
15801the buffer's header-line. Second optional arg WINDOW specifies a 15801the buffer's header-line. Second optional arg WINDOW specifies a
15802different window to use as the context for the formatting. 15802different window to use as the context for the formatting.
15803If third optional arg NO-PROPS is non-nil, string is not propertized. */) 15803If third optional arg NO-PROPS is non-nil, string is not propertized.
15804 (format, window, no_props) 15804Fourth optional arg BUFFER specifies which buffer to use. */)
15805 Lisp_Object format, window, no_props; 15805 (format, window, no_props, buffer)
15806 Lisp_Object format, window, no_props, buffer;
15806{ 15807{
15807 struct it it; 15808 struct it it;
15808 int len; 15809 int len;
@@ -15814,12 +15815,16 @@ If third optional arg NO-PROPS is non-nil, string is not propertized. */)
15814 window = selected_window; 15815 window = selected_window;
15815 CHECK_WINDOW (window); 15816 CHECK_WINDOW (window);
15816 w = XWINDOW (window); 15817 w = XWINDOW (window);
15817 CHECK_BUFFER (w->buffer);
15818 15818
15819 if (XBUFFER (w->buffer) != current_buffer) 15819 if (NILP (buffer))
15820 buffer = w->buffer;
15821
15822 CHECK_BUFFER (buffer);
15823
15824 if (XBUFFER (buffer) != current_buffer)
15820 { 15825 {
15821 old_buffer = current_buffer; 15826 old_buffer = current_buffer;
15822 set_buffer_internal_1 (XBUFFER (w->buffer)); 15827 set_buffer_internal_1 (XBUFFER (buffer));
15823 } 15828 }
15824 15829
15825 if (NILP (format) || EQ (format, Qt)) 15830 if (NILP (format) || EQ (format, Qt))