Previous: Modeline Variables, Up: Modeline Format [Contents][Index]
%-Constructs in the ModeLineThe following table lists the recognized %-constructs and what
they mean. In any construct except ‘%%’, you can add a decimal
integer after the ‘%’ to specify how many characters to display.
%bThe current buffer name, obtained with the buffer-name function.
See Buffer Names.
%fThe visited file name, obtained with the buffer-file-name
function. See Buffer File Name.
%FThe name of the selected frame.
%cThe current column number of point.
%lThe current line number of point.
%*‘%’ if the buffer is read only (see buffer-read-only);
‘*’ if the buffer is modified (see buffer-modified-p);
‘-’ otherwise. See Buffer Modification.
%+‘*’ if the buffer is modified (see buffer-modified-p);
‘%’ if the buffer is read only (see buffer-read-only);
‘-’ otherwise. This differs from ‘%*’ only for a modified
read-only buffer. See Buffer Modification.
%&‘*’ if the buffer is modified, and ‘-’ otherwise.
%sThe status of the subprocess belonging to the current buffer, obtained with
process-status. See Process Information.
%lThe current line number.
%SThe name of the selected frame; this is only meaningful under the X Window System. See Frame Name.
%tWhether the visited file is a text file or a binary file. (This is a meaningful distinction only on certain operating systems.)
%pThe percentage of the buffer text above the top of window, or ‘Top’, ‘Bottom’ or ‘All’.
%PThe percentage of the buffer text that is above the bottom of the window (which includes the text visible in the window, as well as the text above the top), plus ‘Top’ if the top of the buffer is visible on screen; or ‘Bottom’ or ‘All’.
%n‘Narrow’ when narrowing is in effect; nothing otherwise (see
narrow-to-region in Narrowing).
%CUnder SXEmacs/mule, the mnemonic for buffer-file-coding-system.
%[An indication of the depth of recursive editing levels (not counting minibuffer levels): one ‘[’ for each editing level. See Recursive Editing.
%]One ‘]’ for each recursive editing level (not counting minibuffer levels).
%%The character ‘%’—this is how to include a literal ‘%’ in a
string in which %-constructs are allowed.
%-Dashes sufficient to fill the remainder of the modeline.
The following two %-constructs are still supported, but they are
obsolete, since you can get the same results with the variables
mode-name and global-mode-string.
%mThe value of mode-name.
%MThe value of global-mode-string. Currently, only
display-time modifies the value of global-mode-string.
Previous: Modeline Variables, Up: Modeline Format [Contents][Index]