From: Richard M. Stallman Date: Thu, 6 Jan 2005 17:42:58 +0000 (+0000) Subject: (Emulating Mode Line): format-mode-line requires 1 arg. X-Git-Tag: ttn-vms-21-2-B4~2894 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0a54d76e113c13b31fc61ee86781d5c8e077876d;p=emacs.git (Emulating Mode Line): format-mode-line requires 1 arg. --- diff --git a/lispref/modes.texi b/lispref/modes.texi index 2abb8a9c0d9..299579a10af 100644 --- a/lispref/modes.texi +++ b/lispref/modes.texi @@ -1736,24 +1736,22 @@ It is normally @code{nil}, so that ordinary buffers have no header line. 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 window no-props 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. + +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). @end defun @node Imenu