Document restrictions when setting window margins, fringes or scroll bars

* src/window.c (Fset_window_margins, Fset_window_fringes)
(Fset_window_scroll_bars): In doc-strings tell that a window
must be large enough to accommodate fringes, sroll bars and
margins of the desired size.
* doc/lispref/display.texi (Fringe Size/Pos, Scroll Bars)
(Display Margins): Tell that windows must be large enough to
accommodate fringes, sroll bars and margins of the desired
size.
This commit is contained in:
Martin Rudalics 2019-03-13 10:45:28 +01:00
parent cc4cebf5f7
commit bc75589b90
2 changed files with 18 additions and 2 deletions

View file

@ -3916,6 +3916,9 @@ fringe, and likewise @var{right} for the right fringe. A value of
@var{outside-margins} is non-@code{nil}, that specifies that fringes
should appear outside of the display margins.
If @var{window} is not large enough to accommodate fringes of the
desired width, this leaves the fringes of @var{window} unchanged.
The values specified here may be later overridden by invoking
@code{set-window-buffer} (@pxref{Buffers and Windows}) on @var{window}
with its @var{keep-margins} argument @code{nil} or omitted.
@ -4337,6 +4340,9 @@ vertical scroll bar.
The possible values are @code{bottom}, @code{t}, which means to use the
frame's default, and @code{nil} for no horizontal scroll bar.
If @var{window} is not large enough to accommodate a scroll bar of the
desired dimension, this leaves the corresponding scroll bar unchanged.
The values specified here may be later overridden by invoking
@code{set-window-buffer} (@pxref{Buffers and Windows}) on @var{window}
with its @var{keep-margins} argument @code{nil} or omitted.
@ -4926,6 +4932,9 @@ This function specifies the margin widths for window @var{window}, in
character cell units. The argument @var{left} controls the left
margin, and @var{right} controls the right margin (default @code{0}).
If @var{window} is not large enough to accommodate margins of the
desired width, this leaves the margins of @var{window} unchanged.
The values specified here may be later overridden by invoking
@code{set-window-buffer} (@pxref{Buffers and Windows}) on @var{window}
with its @var{keep-margins} argument @code{nil} or omitted.

View file

@ -7076,7 +7076,9 @@ reserve for the left marginal area. Optional third arg RIGHT-WIDTH
does the same for the right marginal area. A nil width parameter
means no margin.
Return t if any margin was actually changed and nil otherwise. */)
Leave margins unchanged if WINDOW is not large enough to accommodate
margins of the desired width. Return t if any margin was actually
changed and nil otherwise. */)
(Lisp_Object window, Lisp_Object left_width, Lisp_Object right_width)
{
struct window *w = set_window_margins (decode_live_window (window),
@ -7158,11 +7160,14 @@ the left fringe. Optional third arg RIGHT-WIDTH specifies the right
fringe width. If a fringe width arg is nil, that means to use the
frame's default fringe width. Default fringe widths can be set with
the command `set-fringe-style'.
If optional fourth arg OUTSIDE-MARGINS is non-nil, draw the fringes
outside of the display margins. By default, fringes are drawn between
display marginal areas and the text area.
Return t if any fringe was actually changed and nil otherwise. */)
Leave fringes unchanged if WINDOW is not large enough to accommodate
fringes of the desired width. Return t if any fringe was actually
changed and nil otherwise. */)
(Lisp_Object window, Lisp_Object left_width,
Lisp_Object right_width, Lisp_Object outside_margins)
{
@ -7287,6 +7292,8 @@ horizontal scroll bar: bottom, nil, or t where nil means to not display
a horizontal scroll bar on WINDOW and t means to use WINDOW frame's
horizontal scroll bar type.
If WINDOW is not large enough to accommodate a scroll bar of the
desired dimension, leave the corresponding scroll bar unchanged.
Return t if scroll bars were actually changed and nil otherwise. */)
(Lisp_Object window, Lisp_Object width, Lisp_Object vertical_type,
Lisp_Object height, Lisp_Object horizontal_type)