41.13.1 Fringe Size and Position

The following buffer-local variables control the position and width of fringes in windows showing that buffer.

Variable: fringes-outside-margins

The fringes normally appear between the display margins and the window text. If the value is non-nil, they appear outside the display margins. See Displaying in the Margins.

Variable: left-fringe-width

This variable, if non-nil, specifies the width of the left fringe in pixels. A value of nil means to use the left fringe width from the window’s frame.

Variable: right-fringe-width

This variable, if non-nil, specifies the width of the right fringe in pixels. A value of nil means to use the right fringe width from the window’s frame.

Any buffer which does not specify values for these variables uses the values specified by the left-fringe and right-fringe frame parameters (see Layout Parameters).

The above variables actually take effect via the function set-window-buffer (see Buffers and Windows), which calls set-window-fringes as a subroutine. If you change one of these variables, the fringe display is not updated in existing windows showing the buffer, unless you call set-window-buffer again in each affected window. You can also use set-window-fringes to control the fringe display in individual windows.

Function: set-window-fringes window left &optional right outside-margins persistent

This function sets the fringe widths of window window. If window is nil, the selected window is used.

The argument left specifies the width in pixels of the left fringe, and likewise right for the right fringe. A value of nil for either one stands for the default width. If outside-margins is non-nil, that specifies that fringes should appear outside of the display margins.

If window is not large enough to accommodate fringes of the desired width, this leaves the fringes of window unchanged.

The values specified here may be later overridden by invoking set-window-buffer (see Buffers and Windows) on window with its keep-margins argument nil or omitted. However, if the optional fifth argument persistent is non-nil and the other arguments are processed successfully, the values specified here unconditionally survive subsequent invocations of set-window-buffer. This can be used to permanently turn off fringes in the minibuffer window, consult the description of set-window-scroll-bars for an example (see Scroll Bars).

Function: window-fringes &optional window

This function returns information about the fringes of a window window. If window is omitted or nil, the selected window is used. The value has the form (left-width right-width outside-margins persistent).