diff options
| author | Glenn Morris | 2019-04-10 09:07:16 -0700 |
|---|---|---|
| committer | Glenn Morris | 2019-04-10 09:07:16 -0700 |
| commit | 7f88eecd7cd0054a83f5cad61ddde1830f3539a3 (patch) | |
| tree | d7d0853b1619ac284ae14538dda1499864f0ebe9 /doc | |
| parent | 0cef057b02b088ded8b46e3453ac0d891888423a (diff) | |
| parent | a5da653319a3018074debfc7b4fdd90ac7ea838c (diff) | |
| download | emacs-7f88eecd7cd0054a83f5cad61ddde1830f3539a3.tar.gz emacs-7f88eecd7cd0054a83f5cad61ddde1830f3539a3.zip | |
Merge from origin/emacs-26
a5da653 * src/editfns.c (Fnarrow_to_region): Doc fix. (Bug#35163)
646d33d Fix doc strings of 'vc-version-diff' and 'vc-version-ediff'
a30a6c3 Improve documentation of set-window-start
92ce2dd Improve documentation of window parameters
6dc42c5 Improve commentary in frame.el
a8cffcf Fix typo in a doc string
9e79f19 (emacs-26) ; * src/fontset.c (set-fontset-font): Use uppercas...
# Conflicts:
# lisp/vc/vc.el
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/windows.texi | 115 |
1 files changed, 66 insertions, 49 deletions
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 6b716323357..32e8c2afa31 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi | |||
| @@ -1951,7 +1951,13 @@ The optional argument @var{all-frames} has the same meaning as in | |||
| 1951 | @code{next-window}. | 1951 | @code{next-window}. |
| 1952 | 1952 | ||
| 1953 | This function does not select a window that has a non-@code{nil} | 1953 | This function does not select a window that has a non-@code{nil} |
| 1954 | @code{no-other-window} window parameter (@pxref{Window Parameters}). | 1954 | @code{no-other-window} window parameter (@pxref{Window Parameters}), |
| 1955 | provided that @code{ignore-window-parameters} is @code{nil}. | ||
| 1956 | |||
| 1957 | If the @code{other-window} parameter of the selected window is a | ||
| 1958 | function, and @code{ignore-window-parameters} is @code{nil}, that | ||
| 1959 | function will be called with the arguments @var{count} and | ||
| 1960 | @var{all-frames} instead of the normal operation of this function. | ||
| 1955 | @end deffn | 1961 | @end deffn |
| 1956 | 1962 | ||
| 1957 | @defun walk-windows fun &optional minibuf all-frames | 1963 | @defun walk-windows fun &optional minibuf all-frames |
| @@ -3936,8 +3942,33 @@ described next to deal with the window and its buffer. | |||
| 3936 | This function handles @var{window} and its buffer after quitting. The | 3942 | This function handles @var{window} and its buffer after quitting. The |
| 3937 | optional argument @var{window} must be a live window and defaults to | 3943 | optional argument @var{window} must be a live window and defaults to |
| 3938 | the selected one. The function's behavior is determined by the four | 3944 | the selected one. The function's behavior is determined by the four |
| 3939 | elements of the @code{quit-restore} window parameter (@pxref{Window | 3945 | elements of the list specified by the @code{quit-restore} window |
| 3940 | Parameters}), which is set to @code{nil} afterwards. | 3946 | parameter (@pxref{Window Parameters}), which is set to @code{nil} |
| 3947 | afterwards. | ||
| 3948 | |||
| 3949 | The first element of the @code{quit-restore} parameter is one of the | ||
| 3950 | symbols @code{window}, meaning that the window has been specially | ||
| 3951 | created by @code{display-buffer}; @code{frame}, a separate frame has | ||
| 3952 | been created; @code{same}, the window has only ever displayed this | ||
| 3953 | buffer; or @code{other}, the window showed another buffer before. | ||
| 3954 | @code{frame} and @code{window} affect how the window is quit, while | ||
| 3955 | @code{same} and @code{other} affect the redisplay of buffers | ||
| 3956 | previously shown in this window. | ||
| 3957 | |||
| 3958 | The second element is either one of the symbols @code{window} or | ||
| 3959 | @code{frame}, or a list whose elements are the buffer shown in the | ||
| 3960 | window before, that buffer's window start and window point positions, | ||
| 3961 | and the window's height at that time. If that buffer is still live | ||
| 3962 | when the window is quit, then the function @code{quit-restore-window} | ||
| 3963 | reuses the window to display the buffer. | ||
| 3964 | |||
| 3965 | The third element is the window selected at the time the parameter was | ||
| 3966 | created. If @code{quit-restore-window} deletes the window passed to | ||
| 3967 | it as argument, it then tries to reselect this window. | ||
| 3968 | |||
| 3969 | The fourth element is the buffer whose display caused the creation of | ||
| 3970 | this parameter. @code{quit-restore-window} deletes the specified window | ||
| 3971 | only if it still shows that buffer. | ||
| 3941 | 3972 | ||
| 3942 | The window is deleted entirely if: 1) the first element of the | 3973 | The window is deleted entirely if: 1) the first element of the |
| 3943 | @code{quit-restore} parameter is one of 'window or 'frame, 2) the | 3974 | @code{quit-restore} parameter is one of 'window or 'frame, 2) the |
| @@ -4627,13 +4658,14 @@ This function sets the display-start position of @var{window} to | |||
| 4627 | @var{position} in @var{window}'s buffer. It returns @var{position}. | 4658 | @var{position} in @var{window}'s buffer. It returns @var{position}. |
| 4628 | 4659 | ||
| 4629 | The display routines insist that the position of point be visible when a | 4660 | The display routines insist that the position of point be visible when a |
| 4630 | buffer is displayed. Normally, they change the display-start position | 4661 | buffer is displayed. Normally, they select the display-start position |
| 4631 | (that is, scroll the window) whenever necessary to make point visible. | 4662 | according to their internal logic (and scroll the window if necessary) |
| 4632 | However, if you specify the start position with this function using | 4663 | to make point visible. However, if you specify the start position |
| 4633 | @code{nil} for @var{noforce}, it means you want display to start at | 4664 | with this function using @code{nil} for @var{noforce}, it means you |
| 4634 | @var{position} even if that would put the location of point off the | 4665 | want display to start at @var{position} even if that would put the |
| 4635 | screen. If this does place point off screen, the display routines move | 4666 | location of point off the screen. If this does place point off |
| 4636 | point to the left margin on the middle line in the window. | 4667 | screen, the display routines attempt to move point to the left margin |
| 4668 | on the middle line in the window. | ||
| 4637 | 4669 | ||
| 4638 | For example, if point @w{is 1} and you set the start of the window | 4670 | For example, if point @w{is 1} and you set the start of the window |
| 4639 | @w{to 37}, the start of the next line, point will be above the top | 4671 | @w{to 37}, the start of the next line, point will be above the top |
| @@ -4680,6 +4712,13 @@ it is still 1 when redisplay occurs. Here is an example: | |||
| 4680 | @end group | 4712 | @end group |
| 4681 | @end example | 4713 | @end example |
| 4682 | 4714 | ||
| 4715 | If the attempt to make point visible (i.e., in a fully-visible screen | ||
| 4716 | line) fails, the display routines will disregard the requested | ||
| 4717 | window-start position and compute a new one anyway. Thus, for | ||
| 4718 | reliable results Lisp programs that call this function should always | ||
| 4719 | move point to be inside the window whose display starts at | ||
| 4720 | @var{position}. | ||
| 4721 | |||
| 4683 | If @var{noforce} is non-@code{nil}, and @var{position} would place point | 4722 | If @var{noforce} is non-@code{nil}, and @var{position} would place point |
| 4684 | off screen at the next redisplay, then redisplay computes a new window-start | 4723 | off screen at the next redisplay, then redisplay computes a new window-start |
| 4685 | position that works well with point, and thus @var{position} is not used. | 4724 | position that works well with point, and thus @var{position} is not used. |
| @@ -5796,8 +5835,8 @@ and heights, if possible. Frames are not resized by this function. | |||
| 5796 | @section Window Parameters | 5835 | @section Window Parameters |
| 5797 | @cindex window parameters | 5836 | @cindex window parameters |
| 5798 | 5837 | ||
| 5799 | This section describes how window parameters can be used to associate | 5838 | This section describes the window parameters that can be used to |
| 5800 | additional information with windows. | 5839 | associate additional information with windows. |
| 5801 | 5840 | ||
| 5802 | @defun window-parameter window parameter | 5841 | @defun window-parameter window parameter |
| 5803 | This function returns @var{window}'s value for @var{parameter}. The | 5842 | This function returns @var{window}'s value for @var{parameter}. The |
| @@ -5930,44 +5969,21 @@ parameter is installed and updated by the function | |||
| 5930 | @vindex quit-restore@r{, a window parameter} | 5969 | @vindex quit-restore@r{, a window parameter} |
| 5931 | This parameter is installed by the buffer display functions | 5970 | This parameter is installed by the buffer display functions |
| 5932 | (@pxref{Choosing Window}) and consulted by @code{quit-restore-window} | 5971 | (@pxref{Choosing Window}) and consulted by @code{quit-restore-window} |
| 5933 | (@pxref{Quitting Windows}). It contains four elements: | 5972 | (@pxref{Quitting Windows}). It is a list of four elements, see the |
| 5934 | 5973 | description of @code{quit-restore-window} in @ref{Quitting Windows} | |
| 5935 | The first element is one of the symbols @code{window}, meaning that | 5974 | for details. |
| 5936 | the window has been specially created by @code{display-buffer}; | ||
| 5937 | @code{frame}, a separate frame has been created; @code{same}, the | ||
| 5938 | window has only ever displayed this buffer; or @code{other}, the | ||
| 5939 | window showed another buffer before. @code{frame} and @code{window} | ||
| 5940 | affect how the window is quit, while @code{same} and @code{other} | ||
| 5941 | affect the redisplay of buffers previously shown in this window. | ||
| 5942 | 5975 | ||
| 5943 | The second element is either one of the symbols @code{window} or | 5976 | @item window-side |
| 5944 | @code{frame}, or a list whose elements are the buffer shown in the | 5977 | @itemx window-slot |
| 5945 | window before, that buffer's window start and window point positions, | ||
| 5946 | and the window's height at that time. If that buffer is still live | ||
| 5947 | when the window is quit, then the function @code{quit-restore-window} | ||
| 5948 | reuses the window to display the buffer. | ||
| 5949 | |||
| 5950 | The third element is the window selected at the time the parameter was | ||
| 5951 | created. If @code{quit-restore-window} deletes the window passed to | ||
| 5952 | it as argument, it then tries to reselect this window. | ||
| 5953 | |||
| 5954 | The fourth element is the buffer whose display caused the creation of | ||
| 5955 | this parameter. @code{quit-restore-window} deletes the specified window | ||
| 5956 | only if it still shows that buffer. | ||
| 5957 | |||
| 5958 | See the description of @code{quit-restore-window} in @ref{Quitting | ||
| 5959 | Windows} for details. | ||
| 5960 | |||
| 5961 | @item window-side window-slot | ||
| 5962 | @vindex window-side@r{, a window parameter} | 5978 | @vindex window-side@r{, a window parameter} |
| 5963 | @vindex window-slot@r{, a window parameter} | 5979 | @vindex window-slot@r{, a window parameter} |
| 5964 | These parameters are used for implementing side windows (@pxref{Side | 5980 | These parameters are used internally for implementing side windows |
| 5965 | Windows}). | 5981 | (@pxref{Side Windows}). |
| 5966 | 5982 | ||
| 5967 | @item window-atom | 5983 | @item window-atom |
| 5968 | @vindex window-atom@r{, a window parameter} | 5984 | @vindex window-atom@r{, a window parameter} |
| 5969 | This parameter is used for implementing atomic windows, see @ref{Atomic | 5985 | This parameter is used internally for implementing atomic windows, see |
| 5970 | Windows}. | 5986 | @ref{Atomic Windows}. |
| 5971 | 5987 | ||
| 5972 | @item mode-line-format | 5988 | @item mode-line-format |
| 5973 | @vindex mode-line-format@r{, a window parameter} | 5989 | @vindex mode-line-format@r{, a window parameter} |
| @@ -5989,11 +6005,12 @@ affected. | |||
| 5989 | 6005 | ||
| 5990 | @item min-margins | 6006 | @item min-margins |
| 5991 | @vindex min-margins@r{, a window parameter} | 6007 | @vindex min-margins@r{, a window parameter} |
| 5992 | The value of this parameter is a cons cell whose @sc{car} and @sc{cdr}, | 6008 | The value of this parameter is a cons cell whose @sc{car} and |
| 5993 | if non-@code{nil}, specify the minimum values (in columns) for the left | 6009 | @sc{cdr}, if non-@code{nil}, specify the minimum values (in columns) |
| 5994 | and right margin of this window. When present, Emacs will use these | 6010 | for the left and right margin of this window (@pxref{Display Margins}. |
| 5995 | values instead of the actual margin widths for determining whether a | 6011 | When present, Emacs will use these values instead of the actual margin |
| 5996 | window can be split or shrunk horizontally. | 6012 | widths for determining whether a window can be split or shrunk |
| 6013 | horizontally. | ||
| 5997 | 6014 | ||
| 5998 | Emacs never auto-adjusts the margins of any window after splitting or | 6015 | Emacs never auto-adjusts the margins of any window after splitting or |
| 5999 | resizing it. It is the sole responsibility of any application setting | 6016 | resizing it. It is the sole responsibility of any application setting |