diff options
| author | Martin Rudalics | 2017-05-27 15:14:52 +0200 |
|---|---|---|
| committer | Martin Rudalics | 2017-05-27 15:14:52 +0200 |
| commit | 704fea97e495b43e4bbd03f28d0ccc66b45e80a8 (patch) | |
| tree | dd157ab5b2b2d33afe84f3037ea701e487c933aa | |
| parent | 3fc36f427a6dfe5366fd1391fee1d037a1bd6cd7 (diff) | |
| download | emacs-704fea97e495b43e4bbd03f28d0ccc66b45e80a8.tar.gz emacs-704fea97e495b43e4bbd03f28d0ccc66b45e80a8.zip | |
Minor doc and doc-string fixes (Bug#27091)
* src/window.c (Fset_window_scroll_bars): Fix doc-string.
* doc/lispref/display.texi (Fringe Size/Pos, Scroll Bars)
(Display Margins): Mention that `set-window-buffer' may override
settings made by `set-window-fringes', `set-window-scroll-bars'
and `set-window-margins'.
* doc/lispref/windows.texi (Buffers and Windows): Fix doc of
`set-window-buffer'.
| -rw-r--r-- | doc/lispref/display.texi | 15 | ||||
| -rw-r--r-- | doc/lispref/windows.texi | 4 | ||||
| -rw-r--r-- | src/window.c | 16 |
3 files changed, 24 insertions, 11 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 51e31aa273f..aa75dcf5a0a 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -3798,6 +3798,10 @@ fringe, and likewise @var{right} for the right fringe. A value of | |||
| 3798 | @code{nil} for either one stands for the default width. If | 3798 | @code{nil} for either one stands for the default width. If |
| 3799 | @var{outside-margins} is non-@code{nil}, that specifies that fringes | 3799 | @var{outside-margins} is non-@code{nil}, that specifies that fringes |
| 3800 | should appear outside of the display margins. | 3800 | should appear outside of the display margins. |
| 3801 | |||
| 3802 | The values specified here may be later overridden by invoking | ||
| 3803 | @code{set-window-buffer} (@pxref{Buffers and Windows}) on @var{window} | ||
| 3804 | with its @var{keep-margins} argument @code{nil} or omitted. | ||
| 3801 | @end defun | 3805 | @end defun |
| 3802 | 3806 | ||
| 3803 | @defun window-fringes &optional window | 3807 | @defun window-fringes &optional window |
| @@ -4200,7 +4204,8 @@ using the following function: | |||
| 4200 | 4204 | ||
| 4201 | @defun set-window-scroll-bars window &optional width vertical-type height horizontal-type | 4205 | @defun set-window-scroll-bars window &optional width vertical-type height horizontal-type |
| 4202 | This function sets the width and/or height and the types of scroll bars | 4206 | This function sets the width and/or height and the types of scroll bars |
| 4203 | for window @var{window}. | 4207 | for window @var{window}. If @var{window} is @code{nil}, the selected |
| 4208 | window is used. | ||
| 4204 | 4209 | ||
| 4205 | @var{width} specifies the width of the vertical scroll bar in pixels | 4210 | @var{width} specifies the width of the vertical scroll bar in pixels |
| 4206 | (@code{nil} means use the width specified for the frame). | 4211 | (@code{nil} means use the width specified for the frame). |
| @@ -4215,7 +4220,9 @@ vertical scroll bar. | |||
| 4215 | The possible values are @code{bottom}, @code{t}, which means to use the | 4220 | The possible values are @code{bottom}, @code{t}, which means to use the |
| 4216 | frame's default, and @code{nil} for no horizontal scroll bar. | 4221 | frame's default, and @code{nil} for no horizontal scroll bar. |
| 4217 | 4222 | ||
| 4218 | If @var{window} is @code{nil}, the selected window is used. | 4223 | The values specified here may be later overridden by invoking |
| 4224 | @code{set-window-buffer} (@pxref{Buffers and Windows}) on @var{window} | ||
| 4225 | with its @var{keep-margins} argument @code{nil} or omitted. | ||
| 4219 | @end defun | 4226 | @end defun |
| 4220 | 4227 | ||
| 4221 | The following four functions take as argument a live window which | 4228 | The following four functions take as argument a live window which |
| @@ -4759,6 +4766,10 @@ Thus, you can make changes take effect by calling | |||
| 4759 | This function specifies the margin widths for window @var{window}, in | 4766 | This function specifies the margin widths for window @var{window}, in |
| 4760 | character cell units. The argument @var{left} controls the left | 4767 | character cell units. The argument @var{left} controls the left |
| 4761 | margin, and @var{right} controls the right margin (default @code{0}). | 4768 | margin, and @var{right} controls the right margin (default @code{0}). |
| 4769 | |||
| 4770 | The values specified here may be later overridden by invoking | ||
| 4771 | @code{set-window-buffer} (@pxref{Buffers and Windows}) on @var{window} | ||
| 4772 | with its @var{keep-margins} argument @code{nil} or omitted. | ||
| 4762 | @end defun | 4773 | @end defun |
| 4763 | 4774 | ||
| 4764 | @defun window-margins &optional window | 4775 | @defun window-margins &optional window |
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index b015233753f..3a9257e05af 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi | |||
| @@ -2049,8 +2049,8 @@ signals an error. @xref{Dedicated Windows}. | |||
| 2049 | By default, this function resets @var{window}'s position, display | 2049 | By default, this function resets @var{window}'s position, display |
| 2050 | margins, fringe widths, and scroll bar settings, based on the local | 2050 | margins, fringe widths, and scroll bar settings, based on the local |
| 2051 | variables in the specified buffer. However, if the optional argument | 2051 | variables in the specified buffer. However, if the optional argument |
| 2052 | @var{keep-margins} is non-@code{nil}, it leaves the display margins | 2052 | @var{keep-margins} is non-@code{nil}, it leaves @var{window}'s display |
| 2053 | and fringe widths unchanged. | 2053 | margins, fringes and scroll bar settings alone. |
| 2054 | 2054 | ||
| 2055 | When writing an application, you should normally use the higher-level | 2055 | When writing an application, you should normally use the higher-level |
| 2056 | functions described in @ref{Switching Buffers}, instead of calling | 2056 | functions described in @ref{Switching Buffers}, instead of calling |
diff --git a/src/window.c b/src/window.c index fc9f40222bb..bf89f0e488b 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -3342,7 +3342,7 @@ run_window_size_change_functions (Lisp_Object frame) | |||
| 3342 | /* Make WINDOW display BUFFER. RUN_HOOKS_P means it's allowed | 3342 | /* Make WINDOW display BUFFER. RUN_HOOKS_P means it's allowed |
| 3343 | to run hooks. See make_frame for a case where it's not allowed. | 3343 | to run hooks. See make_frame for a case where it's not allowed. |
| 3344 | KEEP_MARGINS_P means that the current margins, fringes, and | 3344 | KEEP_MARGINS_P means that the current margins, fringes, and |
| 3345 | scroll-bar settings of the window are not reset from the buffer's | 3345 | scroll bar settings of the window are not reset from the buffer's |
| 3346 | local settings. */ | 3346 | local settings. */ |
| 3347 | 3347 | ||
| 3348 | void | 3348 | void |
| @@ -7045,16 +7045,18 @@ DEFUN ("set-window-scroll-bars", Fset_window_scroll_bars, | |||
| 7045 | WINDOW must be a live window and defaults to the selected one. | 7045 | WINDOW must be a live window and defaults to the selected one. |
| 7046 | 7046 | ||
| 7047 | Second parameter WIDTH specifies the pixel width for the vertical scroll | 7047 | Second parameter WIDTH specifies the pixel width for the vertical scroll |
| 7048 | bar. If WIDTH is nil, use the scroll-bar width of WINDOW's frame. | 7048 | bar. If WIDTH is nil, use the scroll bar width of WINDOW's frame. |
| 7049 | Third parameter VERTICAL-TYPE specifies the type of the vertical scroll | 7049 | Third parameter VERTICAL-TYPE specifies the type of the vertical scroll |
| 7050 | bar: left, right, or nil. If VERTICAL-TYPE is t, this means use the | 7050 | bar: left, right, nil or t where nil means to not display a vertical |
| 7051 | frame's scroll-bar type. | 7051 | scroll bar on WINDOW and t means to use WINDOW frame's vertical scroll |
| 7052 | bar type. | ||
| 7052 | 7053 | ||
| 7053 | Fourth parameter HEIGHT specifies the pixel height for the horizontal | 7054 | Fourth parameter HEIGHT specifies the pixel height for the horizontal |
| 7054 | scroll bar. If HEIGHT is nil, use the scroll-bar height of WINDOW's | 7055 | scroll bar. If HEIGHT is nil, use the scroll bar height of WINDOW's |
| 7055 | frame. Fifth parameter HORIZONTAL-TYPE specifies the type of the | 7056 | frame. Fifth parameter HORIZONTAL-TYPE specifies the type of the |
| 7056 | horizontal scroll bar: nil, bottom, or t. If HORIZONTAL-TYPE is t, this | 7057 | horizontal scroll bar: bottom, nil, or t where nil means to not display |
| 7057 | means to use the frame's horizontal scroll-bar type. | 7058 | a horizontal scroll bar on WINDOW and t means to use WINDOW frame's |
| 7059 | horizontal scroll bar type. | ||
| 7058 | 7060 | ||
| 7059 | Return t if scroll bars were actually changed and nil otherwise. */) | 7061 | Return t if scroll bars were actually changed and nil otherwise. */) |
| 7060 | (Lisp_Object window, Lisp_Object width, Lisp_Object vertical_type, | 7062 | (Lisp_Object window, Lisp_Object width, Lisp_Object vertical_type, |