diff options
| author | Eli Zaretskii | 2010-12-18 10:53:28 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2010-12-18 10:53:28 +0200 |
| commit | 287e63bb58cf30457222598c64b4bf551cdeb381 (patch) | |
| tree | 10867687196a469f722029109d6960c44595a4f6 | |
| parent | 30d621a239c131219cade1d57742c5e852bcc4f9 (diff) | |
| download | emacs-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/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/lispref/modes.texi | 40 | ||||
| -rw-r--r-- | etc/NEWS | 5 |
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 @@ | |||
| 1 | 2010-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 | |||
| 1 | 2010-12-11 Eli Zaretskii <eliz@gnu.org> | 6 | 2010-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 | |||
| 2111 | based on a certain mode-line specification. | 2111 | based 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 |
| 2114 | This function formats a line of text according to @var{format} as if | 2114 | This function formats a line of text according to @var{format} as if it |
| 2115 | it were generating the mode line for @var{window}, but instead of | 2115 | were generating the mode line for @var{window}, but it also returns the |
| 2116 | displaying the text in the mode line or the header line, it returns | 2116 | text as a string. The argument @var{window} defaults to the selected |
| 2117 | the text as a string. The argument @var{window} defaults to the | 2117 | window. If @var{buffer} is non-@code{nil}, all the information used is |
| 2118 | selected window. If @var{buffer} is non-@code{nil}, all the | 2118 | taken from @var{buffer}; by default, it comes from @var{window}'s |
| 2119 | information used is taken from @var{buffer}; by default, it comes from | 2119 | buffer. |
| 2120 | @var{window}'s buffer. | ||
| 2121 | 2120 | ||
| 2122 | The value string normally has text properties that correspond to the | 2121 | The value string normally has text properties that correspond to the |
| 2123 | faces, keymaps, etc., that the mode line would have. And any character | 2122 | faces, keymaps, etc., that the mode line would have. And any character |
| 2124 | for which no @code{face} property is specified gets a default | 2123 | for which no @code{face} property is specified gets a default value |
| 2125 | value which is usually @var{face}. (If @var{face} is @code{t}, | 2124 | determined by @var{face}. If @var{face} is @code{t}, that stands for |
| 2126 | that stands for either @code{mode-line} if @var{window} is selected, | 2125 | either @code{mode-line} if @var{window} is selected, otherwise |
| 2127 | otherwise @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 |
| 2128 | omitted, that stands for no face property.) | 2127 | stands for no face property. |
| 2129 | 2128 | ||
| 2130 | However, if @var{face} is an integer, the value has no text properties. | 2129 | However, if @var{face} is an integer, the value has no text properties. |
| 2131 | 2130 | ||
| 2131 | You can also specify other valid faces as the value of @var{face}. | ||
| 2132 | If 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 | ||
| 2134 | face provides the @code{face} property for characters whose face is not | ||
| 2135 | specified by @var{format}. Any other face is treated as @code{default}, | ||
| 2136 | but you can remap one of the basic faces (@pxref{Face Remapping}) to get | ||
| 2137 | the same effect as with non-basic faces. | ||
| 2138 | |||
| 2139 | Note that using @code{mode-line}, @code{mode-line-inactive}, or | ||
| 2140 | @code{header-line} as @var{face} will actually redisplay the mode line | ||
| 2141 | or the header line, respectively, using the current definitions of the | ||
| 2142 | corresponding face, in addition to returning the formatted string. | ||
| 2143 | (Other faces do not cause redisplay.) | ||
| 2144 | |||
| 2132 | For example, @code{(format-mode-line header-line-format)} returns the | 2145 | For example, @code{(format-mode-line header-line-format)} returns the |
| 2133 | text that would appear in the selected window's header line (@code{""} | 2146 | text that would appear in the selected window's header line (@code{""} |
| 2134 | if it has no header line). @code{(format-mode-line header-line-format | 2147 | if 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 |
| 2136 | carrying the face that it will have in the header line itself. | 2149 | carrying the face that it will have in the header line itself, and also |
| 2150 | redraws the header line. | ||
| 2137 | @end defun | 2151 | @end defun |
| 2138 | 2152 | ||
| 2139 | @node Imenu | 2153 | @node Imenu |
| @@ -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. |
| 1846 | Use `(format-mode-line mode-name)' to ensure a string value. | 1846 | Use `(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. | ||
| 1849 | The FACE argument to `format-mode-line' should be one of `default', | ||
| 1850 | `mode-line', `mode-line-inactive', `header-line', or `tool-bar'. Any | ||
| 1851 | other 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. |
| 1849 | Use the new function font-family-list (see Lisp Changes, below). | 1854 | Use the new function font-family-list (see Lisp Changes, below). |
| 1850 | 1855 | ||