From 2e4ab211536225c719bb80df716f4e9481bce243 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 25 Dec 2010 12:14:48 +0200 Subject: [PATCH] More fallout from fixing bug #7587. src/xdisp.c (Fformat_mode_line): Doc fix: no need to state that only the basic faces are supported. doc/lispref/modes.texi (Emulating Mode Line): Fix last change. etc/NEWS: Remove the entry about format-mode-line accepting only basic faces. --- doc/lispref/ChangeLog | 4 ++++ doc/lispref/modes.texi | 23 +++++++++-------------- etc/NEWS | 5 ----- src/ChangeLog | 5 +++++ src/xdisp.c | 12 +++++++----- 5 files changed, 25 insertions(+), 24 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 30e77ab38af..155e6b005e4 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,7 @@ +2010-12-25 Eli Zaretskii + + * modes.texi (Emulating Mode Line): Fix last change. + 2010-12-18 Eli Zaretskii * modes.texi (Emulating Mode Line): Update documentation of diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 5c5e6cd3fbb..ad7a3a5037e 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -2119,22 +2119,17 @@ taken from @var{buffer}; by default, it comes from @var{window}'s buffer. The value string normally has text properties that correspond to the -faces, keymaps, etc., that the mode line would have. And any character -for which no @code{face} property is specified gets a default value -determined by @var{face}. If @var{face} is @code{t}, that stands for -either @code{mode-line} if @var{window} is selected, otherwise -@code{mode-line-inactive}. If @var{face} is @code{nil} or omitted, that -stands for no face property. - -However, if @var{face} is an integer, the value has no text properties. +faces, keymaps, etc., that the mode line would have. Any character for +which no @code{face} property is specified by @var{format} gets a +default value determined by @var{face}. If @var{face} is @code{t}, that +stands for either @code{mode-line} if @var{window} is selected, +otherwise @code{mode-line-inactive}. If @var{face} is @code{nil} or +omitted, that stands for the default face. If @var{face} is an integer, +the value returned by this function will have no text properties. You can also specify other valid faces as the value of @var{face}. -If the value is a @dfn{basic face}, one of @code{default}, @code{mode-line}, -@code{mode-line-inactive}, @code{header-line}, or @code{tool-bar}, that -face provides the @code{face} property for characters whose face is not -specified by @var{format}. Any other face is treated as @code{default}, -but you can remap one of the basic faces (@pxref{Face Remapping}) to get -the same effect as with non-basic faces. +If specified, that face provides the @code{face} property for characters +whose face is not specified by @var{format}. Note that using @code{mode-line}, @code{mode-line-inactive}, or @code{header-line} as @var{face} will actually redisplay the mode line diff --git a/etc/NEWS b/etc/NEWS index 1e13d334c77..9e581df439f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1866,11 +1866,6 @@ checking/manipulating elements directly, use the new functions ** `mode-name' is no longer guaranteed to be a string. Use `(format-mode-line mode-name)' to ensure a string value. -** `format-mode-line' now supports only a few basic faces as its FACE argument. -The FACE argument to `format-mode-line' should be one of `default', -`mode-line', `mode-line-inactive', `header-line', or `tool-bar'. Any -other face is treated as `default'. - ** The function x-font-family-list has been removed. Use the new function font-family-list (see Lisp Changes, below). diff --git a/src/ChangeLog b/src/ChangeLog index 8574622c187..673f5f5bb99 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-12-25 Eli Zaretskii + + * xdisp.c (Fformat_mode_line): Doc fix: no need to state that only + the basic faces are supported. + 2010-12-24 Jan Djärv * xterm.c (x_check_fullscreen): Fix pixel/character mixup. diff --git a/src/xdisp.c b/src/xdisp.c index 7308e163c7e..69a0fcfe3d8 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -17883,17 +17883,19 @@ DEFUN ("format-mode-line", Fformat_mode_line, Sformat_mode_line, First arg FORMAT specifies the mode line format (see `mode-line-format' for details) to use. +By default, the format is evaluated for the currently selected window. + Optional second arg FACE specifies the face property to put on all characters for which no face is specified. The value nil means the default face. The value t means whatever face the window's mode line -currently uses \(either `mode-line' or `mode-line-inactive', -depending). An integer value means the value string has no text -properties. Otherwise, the value should be one of `default', -`mode-line', `mode-line-inactive', `header-line', or `tool-bar'. +currently uses (either `mode-line' or `mode-line-inactive', +depending on whether the window is the selected window or not). +An integer value means the value string has no text +properties. Optional third and fourth args WINDOW and BUFFER specify the window and buffer to use as the context for the formatting (defaults -are the selected window and the window's buffer). */) +are the selected window and the WINDOW's buffer). */) (format, face, window, buffer) Lisp_Object format, face, window, buffer; { -- 2.39.2