Mercurial > emacs
diff lispref/modes.texi @ 90072:cb67264d6096
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-2
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-83
- miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-84
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-3
- miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-4
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-5
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-6
- miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-11
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-12
Remove "-face" suffix from lazy-highlight face name
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-13
- miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-16
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-17
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-18
- miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-21
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-22
<no summary provided>
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-23
- miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-39
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-40
Fix regressions from latest reftex update
* miles@gnu.org--gnu-2005/gnus--rel--5.10--base-0
tag of miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-82
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-1
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-2
Merge from miles@gnu.org--gnu-2004
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-3
Merge from emacs--cvs-trunk--0
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sun, 16 Jan 2005 03:40:12 +0000 |
parents | 95879cc1ed20 f50d20947c20 |
children | 3ebd9bdb4fe5 |
line wrap: on
line diff
--- a/lispref/modes.texi Sun Jan 02 09:21:32 2005 +0000 +++ b/lispref/modes.texi Sun Jan 16 03:40:12 2005 +0000 @@ -1736,24 +1736,29 @@ the text that would appear in a mode line or header line based on certain mode-line specification. -@defun format-mode-line &optional format window no-props buffer +@defun format-mode-line format &optional face window buffer This function formats a line of text according to @var{format} as if it were generating the mode line for @var{window}, but instead of displaying the text in the mode line or the header line, it returns -the text as a string. - -If @var{format} is @code{nil}, that means to use -@code{mode-line-format} and return the text that would appear in the -mode line. If @var{format} is @code{t}, that means to use -@code{header-line-format} so as to return the text that would appear -in the header line (@code{""} if the window has no header line). -The argument @var{window} defaults to the selected window. +the text as a string. The argument @var{window} defaults to the +selected window. If @var{buffer} is non-@code{nil}, all the +information used is 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. If -@var{no-props} is non-@code{nil}, the value has no text properties. -If @var{buffer} is non-@code{nil}, all the information used is taken -from @var{buffer}; by default,it comes from @var{window}'s buffer. +faces, keymaps, etc., that the mode line would have. And any character +for which no @code{face} property is specified gets a default +value which is usually @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}.) + +However, if @var{face} is an integer, the value has no text properties. + +For example, @code{(format-mode-line header-line-format)} returns the +text that would appear in the selected window's header line (@code{""} +if it has no header line). @code{(format-mode-line header-line-format +'header-line)} returns the same text, with each character +carrying the face that it will have in the header line itself. @end defun @node Imenu