aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2010-12-18 10:53:28 +0200
committerEli Zaretskii2010-12-18 10:53:28 +0200
commit287e63bb58cf30457222598c64b4bf551cdeb381 (patch)
tree10867687196a469f722029109d6960c44595a4f6
parent30d621a239c131219cade1d57742c5e852bcc4f9 (diff)
downloademacs-287e63bb58cf30457222598c64b4bf551cdeb381.tar.gz
emacs-287e63bb58cf30457222598c64b4bf551cdeb381.zip
Fallout from fixing bug #7587.
doc/lispref/modes.texi (Emulating Mode Line): Update documentation of format-mode-line according to changes that fixed bug #7587. etc/NEWS: Mention the incompatible change in format-mode-line wrt its FACE argument.
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/modes.texi40
-rw-r--r--etc/NEWS5
3 files changed, 37 insertions, 13 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 970da3f5ff2..30e77ab38af 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
12010-12-18 Eli Zaretskii <eliz@gnu.org>
2
3 * modes.texi (Emulating Mode Line): Update documentation of
4 format-mode-line according to changes that fixed bug #7587.
5
12010-12-11 Eli Zaretskii <eliz@gnu.org> 62010-12-11 Eli Zaretskii <eliz@gnu.org>
2 7
3 * processes.texi (Shell Arguments): 8 * processes.texi (Shell Arguments):
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 0b6547177e0..5c5e6cd3fbb 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -2111,29 +2111,43 @@ the text that would appear in a mode line or header line
2111based on a certain mode-line specification. 2111based on a certain mode-line specification.
2112 2112
2113@defun format-mode-line format &optional face window buffer 2113@defun format-mode-line format &optional face window buffer
2114This function formats a line of text according to @var{format} as if 2114This function formats a line of text according to @var{format} as if it
2115it were generating the mode line for @var{window}, but instead of 2115were generating the mode line for @var{window}, but it also returns the
2116displaying the text in the mode line or the header line, it returns 2116text as a string. The argument @var{window} defaults to the selected
2117the text as a string. The argument @var{window} defaults to the 2117window. If @var{buffer} is non-@code{nil}, all the information used is
2118selected window. If @var{buffer} is non-@code{nil}, all the 2118taken from @var{buffer}; by default, it comes from @var{window}'s
2119information used is taken from @var{buffer}; by default, it comes from 2119buffer.
2120@var{window}'s buffer.
2121 2120
2122The value string normally has text properties that correspond to the 2121The value string normally has text properties that correspond to the
2123faces, keymaps, etc., that the mode line would have. And any character 2122faces, keymaps, etc., that the mode line would have. And any character
2124for which no @code{face} property is specified gets a default 2123for which no @code{face} property is specified gets a default value
2125value which is usually @var{face}. (If @var{face} is @code{t}, 2124determined by @var{face}. If @var{face} is @code{t}, that stands for
2126that stands for either @code{mode-line} if @var{window} is selected, 2125either @code{mode-line} if @var{window} is selected, otherwise
2127otherwise @code{mode-line-inactive}. If @var{face} is @code{nil} or 2126@code{mode-line-inactive}. If @var{face} is @code{nil} or omitted, that
2128omitted, that stands for no face property.) 2127stands for no face property.
2129 2128
2130However, if @var{face} is an integer, the value has no text properties. 2129However, if @var{face} is an integer, the value has no text properties.
2131 2130
2131You can also specify other valid faces as the value of @var{face}.
2132If the value is a @dfn{basic face}, one of @code{default}, @code{mode-line},
2133@code{mode-line-inactive}, @code{header-line}, or @code{tool-bar}, that
2134face provides the @code{face} property for characters whose face is not
2135specified by @var{format}. Any other face is treated as @code{default},
2136but you can remap one of the basic faces (@pxref{Face Remapping}) to get
2137the same effect as with non-basic faces.
2138
2139Note that using @code{mode-line}, @code{mode-line-inactive}, or
2140@code{header-line} as @var{face} will actually redisplay the mode line
2141or the header line, respectively, using the current definitions of the
2142corresponding face, in addition to returning the formatted string.
2143(Other faces do not cause redisplay.)
2144
2132For example, @code{(format-mode-line header-line-format)} returns the 2145For example, @code{(format-mode-line header-line-format)} returns the
2133text that would appear in the selected window's header line (@code{""} 2146text that would appear in the selected window's header line (@code{""}
2134if it has no header line). @code{(format-mode-line header-line-format 2147if it has no header line). @code{(format-mode-line header-line-format
2135'header-line)} returns the same text, with each character 2148'header-line)} returns the same text, with each character
2136carrying the face that it will have in the header line itself. 2149carrying the face that it will have in the header line itself, and also
2150redraws the header line.
2137@end defun 2151@end defun
2138 2152
2139@node Imenu 2153@node Imenu
diff --git a/etc/NEWS b/etc/NEWS
index 6e152777aee..ebc1f0afc9e 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1845,6 +1845,11 @@ checking/manipulating elements directly, use the new functions
1845** `mode-name' is no longer guaranteed to be a string. 1845** `mode-name' is no longer guaranteed to be a string.
1846Use `(format-mode-line mode-name)' to ensure a string value. 1846Use `(format-mode-line mode-name)' to ensure a string value.
1847 1847
1848** `format-mode-line' now supports only a few basic faces as its FACE argument.
1849The FACE argument to `format-mode-line' should be one of `default',
1850`mode-line', `mode-line-inactive', `header-line', or `tool-bar'. Any
1851other face is treated as `default'.
1852
1848** The function x-font-family-list has been removed. 1853** The function x-font-family-list has been removed.
1849Use the new function font-family-list (see Lisp Changes, below). 1854Use the new function font-family-list (see Lisp Changes, below).
1850 1855