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-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:
Specifies the column number where the indicator should be set. It can
take positive numerical values for the column or the special value
t which means that the variable
fill-column will be
Any other value disables the indicator. The default value is
Specifies 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
global-display-fill-column-indicator-mode, the initialization
functions check if this variable is non-
nil, otherwise the
initialization tries to set it to
U+2502 or ‘|’.
Specifies the face used to display the indicator. It inherits its
default values from the face
shadow but 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
how the buffer boundaries and window scrolling is indicated in the
fringes. If the value is
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
position) specifies the position of one of the indicators. The
indicator must be one of
t which specifies the default position for the
indicators not present in the alist. The position is one of
nil which specifies not to show
((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)).