[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Nick Roberts
Subject: format-mode-line
Date: Wed, 5 Jan 2005 01:25:06 +1300

The documentation says:

> format-mode-line is a built-in function in `C source code'.
> (format-mode-line &optional FORMAT WINDOW NO-PROPS BUFFER)

> Return the mode-line of selected window as a string.
> First optional arg FORMAT specifies a different format string (see
> `mode-line-format' for details) to use.  If format is t, return
> the buffer's header-line.

AFAIK FORMAT need not be a string.

The manual also says:

> If FORMAT is `nil', that means to use `mode-line-format'

This does not seem to make sense because if header-line-format is nil
then (format-mode-line header-line-format) will presumably return the
mode-line of selected window as a string.

In any case, (format-mode-line) does not seem to give the right thing,
although (format-mode-line mode-line-format) does.

I suggest changing format-mode-line so that FORMAT is not optional and not
give a special meaning to nil and t. I think format-mode-line is currently
always used with a value for FORMAT. If this is a good idea, I offer to do
it and post my patch here.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]