Here is the correct documentation.
Someone want to submit an info patch? Martin?
`generated-modeline-string' is a built-in constant buffer-local variable.
Value: "Auto-----XEmacs: compat.el (Emacs-Lisp PenDel
Font)----68%-------------------"
Documentation:
String of characters in this buffer's modeline as of the last redisplay.
Each time the modeline is recomputed, the resulting characters are
stored in this string, which is resized as necessary. You may not
set this variable, and modifying this string will not change the
modeline; you have to change `modeline-format' if you want that.
For each extent in `modeline-format' that is encountered when
processing the modeline, a corresponding extent is placed in
`generated-modeline-string' and covers the text over which the
extent in `modeline-format' applies. The extent in
`generated-modeline-string' is made a child of the extent in
`modeline-format', which means that it inherits all properties from
that extent. Note that the extents in `generated-modeline-string'
are managed automatically. You should not explicitly put any extents
in `generated-modeline-string'; if you do, they will disappear the
next time the modeline is processed.
For extents in `modeline-format', the following properties are currently
handled:
`face'
Affects the face of the modeline text. Currently, faces do
not merge properly; only the most recently encountered face
is used. This is a bug.
`keymap'
Affects the disposition of button events over the modeline
text. Multiple applicable keymaps *are* handled properly,
and `modeline-map' still applies to any events that don't
have bindings in extent-specific keymaps.
`help-echo'
If a string, causes the string to be displayed when the mouse
moves over the text.
"Nick V. Pakoulin" wrote:
Whether it is a bug or not, it seems to be undocumented how the
extents are
handled in the modeline format. Looking in info I found descriptions the
following:
-------------------------- Start quote -----------------------------------
`STRING'
A string as a modeline construct is displayed verbatim in the mode
line except for "`%'-constructs". Decimal digits after the `%'
specify the field width for space filling on the right (i.e., the
data is left justified). *Note %-Constructs::.
`SYMBOL'
A symbol as a modeline construct stands for its value. The value
of SYMBOL is used as a modeline construct, in place of SYMBOL.
However, the symbols `t' and `nil' are ignored; so is any symbol
whose value is void.
There is one exception: if the value of SYMBOL is a string, it is
displayed verbatim: the `%'-constructs are not recognized.
`(STRING REST...) or (LIST REST...)'
A list whose first element is a string or list means to process
all the elements recursively and concatenate the results. This is
the most common form of mode line construct.
`(SYMBOL THEN ELSE)'
A list whose first element is a symbol is a conditional. Its
meaning depends on the value of SYMBOL. If the value is non-`nil',
the second element, THEN, is processed recursively as a modeline
element. But if the value of SYMBOL is `nil', the third element,
ELSE, is processed recursively. You may omit ELSE; then the mode
line element displays nothing if the value of SYMBOL is `nil'.
`(WIDTH REST...)'
A list whose first element is an integer specifies truncation or
padding of the results of REST. The remaining elements REST are
processed recursively as modeline constructs and concatenated
together. Then the result is space filled (if WIDTH is positive)
or truncated (to -WIDTH columns, if WIDTH is negative) on the
right.
For example, the usual way to show what percentage of a buffer is
above the top of the window is to use a list like this: `(-3
"%p")'.
-------------------------- End quote ------------------------------------
And what about `(EXTENT REST)'?
Moreover, in documentation to `modeline-buffer-identification' there is written
-------------------------- Start quote -----------------------------------
Setting it would make its value buffer-local.
Documentation:
Modeline control for identifying the buffer being displayed.
Its default value is "XEmacs: %17b" (NOT!). Major modes that edit things
other than ordinary files may change this (e.g. Info, Dired,...)
-------------------------- End quote ------------------------------------
Note that particular `NOT' ;)
Am I missing something?
TIA
Nick.
--
Ben
In order to save my hands, I am cutting back on my mail. I also write
as succinctly as possible -- please don't be offended. If you send me
mail, you _will_ get a response, but please be patient, especially for
XEmacs-related mail. If you need an immediate response and it is not
apparent in your message, please say so. Thanks for your understanding.
See also
http://www.666.com/ben/chronic-pain/