Emacs/emacs/Displaying-Boundaries
Next: Useless Whitespace, Previous: Fringes, Up: Display [Contents][Index]
14.15 Displaying Boundaries
Emacs can add an indicator to display a fill column position. The
fill column indicator is a useful functionality especially in
prog-mode to indicate the position of a specific column.
You can set the buffer-local variables
display-fill-column-indicator and
display-fill-column-indicator-character to activate the
indicator and control how it looks, respectively.
Alternatively you can type M-x display-fill-column-indicator-mode or M-x global-display-fill-column-indicator-mode which enables the indicator locally or globally, respectively, and also chooses the character to use if none is already set. It is possible to use the first one to activate the indicator in a hook and the second one to enable it globally.
There are 2 buffer local variables and 1 face to customize this mode:
display-fill-column-indicator-columnSpecifies the column number where the indicator should be set. It can take positive numerical values for the column or the special value
twhich means that the variablefill-columnwill be used.Any other value disables the indicator. The default value is
t.display-fill-column-indicator-characterSpecifies the character used for the indicator. This character can be any valid character including Unicode ones if the font supports them.
When the mode is enabled through the functions
display-fill-column-indicator-modeorglobal-display-fill-column-indicator-mode, the initialization functions check if this variable is non-nil, otherwise the initialization tries to set it toU+2502or ‘|’.fill-column-indicatorSpecifies the face used to display the indicator. It inherits its default values from the face
shadowbut without background color. To change the indicator color you need only set the foreground color of this face.
On graphical displays, Emacs can indicate the buffer boundaries in the fringes. If you enable this feature, the first line and the last line are marked with angle images in the fringes. This can be combined with up and down arrow images which say whether it is possible to scroll the window.
The buffer-local variable indicate-buffer-boundaries controls
how the buffer boundaries and window scrolling is indicated in the
fringes. If the value is left or right, both angle and
arrow bitmaps are displayed in the left or right fringe, respectively.
If value is an alist (see Association Lists in the Emacs
Lisp Reference Manual), each element (indicator . position) specifies the position of one of the indicators. The
indicator must be one of top, bottom, up,
down, or t which specifies the default position for the
indicators not present in the alist. The position is one of
left, right, or nil which specifies not to show
this indicator.
For example, ((top . left) (t . right)) places the top angle
bitmap in left fringe, the bottom angle bitmap in right fringe, and
both arrow bitmaps in right fringe. To show just the angle bitmaps in
the left fringe, but no arrow bitmaps, use ((top . left) (bottom . left)).
Next: Useless Whitespace, Previous: Fringes, Up: Display [Contents][Index]