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 | |
| 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
| -rw-r--r-- | doc/lispref/windows.texi | 115 | ||||
| -rw-r--r-- | lisp/autorevert.el | 2 | ||||
| -rw-r--r-- | lisp/frame.el | 8 | ||||
| -rw-r--r-- | lisp/vc/vc.el | 17 | ||||
| -rw-r--r-- | src/editfns.c | 5 | ||||
| -rw-r--r-- | src/fontset.c | 2 | ||||
| -rw-r--r-- | src/window.c | 7 |
7 files changed, 99 insertions, 57 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 |
diff --git a/lisp/autorevert.el b/lisp/autorevert.el index e6dfafca2a5..4fb865e8adb 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el | |||
| @@ -465,7 +465,7 @@ If `global-auto-revert-non-file-buffers' is non-nil, this mode | |||
| 465 | may also revert some non-file buffers, as described in the | 465 | may also revert some non-file buffers, as described in the |
| 466 | documentation of that variable. It ignores buffers with modes | 466 | documentation of that variable. It ignores buffers with modes |
| 467 | matching `global-auto-revert-ignore-modes', and buffers with a | 467 | matching `global-auto-revert-ignore-modes', and buffers with a |
| 468 | non-nil vale of `global-auto-revert-ignore-buffer'. | 468 | non-nil value of `global-auto-revert-ignore-buffer'. |
| 469 | 469 | ||
| 470 | When a buffer is reverted, a message is generated. This can be | 470 | When a buffer is reverted, a message is generated. This can be |
| 471 | suppressed by setting `auto-revert-verbose' to nil. | 471 | suppressed by setting `auto-revert-verbose' to nil. |
diff --git a/lisp/frame.el b/lisp/frame.el index b39891cd142..b5c936a51eb 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -1855,6 +1855,14 @@ for FRAME." | |||
| 1855 | 1855 | ||
| 1856 | ;;;; Frame/display capabilities. | 1856 | ;;;; Frame/display capabilities. |
| 1857 | 1857 | ||
| 1858 | ;; These functions should make the features they test explicit in | ||
| 1859 | ;; their names, so that when capabilities or the corresponding Emacs | ||
| 1860 | ;; features change, it will be easy to find all the tests for such | ||
| 1861 | ;; capabilities by a simple text search. See more about the history | ||
| 1862 | ;; and the intent of these functions in | ||
| 1863 | ;; http://lists.gnu.org/archive/html/bug-gnu-emacs/2019-04/msg00004.html | ||
| 1864 | ;; or in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=35058#17. | ||
| 1865 | |||
| 1858 | (declare-function msdos-mouse-p "dosfns.c") | 1866 | (declare-function msdos-mouse-p "dosfns.c") |
| 1859 | 1867 | ||
| 1860 | (defun display-mouse-p (&optional display) | 1868 | (defun display-mouse-p (&optional display) |
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index e6f30c9f804..b992a8ebe09 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el | |||
| @@ -1806,7 +1806,12 @@ Return t if the buffer had changes, nil otherwise." | |||
| 1806 | 1806 | ||
| 1807 | ;;;###autoload | 1807 | ;;;###autoload |
| 1808 | (defun vc-version-diff (_files rev1 rev2) | 1808 | (defun vc-version-diff (_files rev1 rev2) |
| 1809 | "Report diffs between REV1 and REV2 revisions of the fileset." | 1809 | "Report diffs between revisions REV1 and REV2 in the repository history. |
| 1810 | This compares two revisions of the current fileset. | ||
| 1811 | If REV1 is nil, it defaults to the current revision, i.e. revision | ||
| 1812 | of the last commit. | ||
| 1813 | If REV2 is nil, it defaults to the work tree, i.e. the current | ||
| 1814 | state of each file in the fileset." | ||
| 1810 | (interactive (vc-diff-build-argument-list-internal)) | 1815 | (interactive (vc-diff-build-argument-list-internal)) |
| 1811 | ;; All that was just so we could do argument completion! | 1816 | ;; All that was just so we could do argument completion! |
| 1812 | (when (and (not rev1) rev2) | 1817 | (when (and (not rev1) rev2) |
| @@ -1891,8 +1896,14 @@ The merge base is a common ancestor between REV1 and REV2 revisions." | |||
| 1891 | 1896 | ||
| 1892 | ;;;###autoload | 1897 | ;;;###autoload |
| 1893 | (defun vc-version-ediff (files rev1 rev2) | 1898 | (defun vc-version-ediff (files rev1 rev2) |
| 1894 | "Show differences between revisions of the fileset in the | 1899 | "Show differences between REV1 and REV2 of FILES using ediff. |
| 1895 | repository history using ediff." | 1900 | This compares two revisions of the files in FILES. Currently, |
| 1901 | only a single file's revisions can be compared, i.e. FILES can | ||
| 1902 | specify only one file name. | ||
| 1903 | If REV1 is nil, it defaults to the current revision, i.e. revision | ||
| 1904 | of the last commit. | ||
| 1905 | If REV2 is nil, it defaults to the work tree, i.e. the current | ||
| 1906 | state of each file in FILES." | ||
| 1896 | (interactive (vc-diff-build-argument-list-internal)) | 1907 | (interactive (vc-diff-build-argument-list-internal)) |
| 1897 | ;; All that was just so we could do argument completion! | 1908 | ;; All that was just so we could do argument completion! |
| 1898 | (when (and (not rev1) rev2) | 1909 | (when (and (not rev1) rev2) |
diff --git a/src/editfns.c b/src/editfns.c index bfffadc733d..6fb43af4e9c 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -2686,8 +2686,9 @@ but is not deleted; if you save the buffer in a file, the invisible | |||
| 2686 | text is included in the file. \\[widen] makes all visible again. | 2686 | text is included in the file. \\[widen] makes all visible again. |
| 2687 | See also `save-restriction'. | 2687 | See also `save-restriction'. |
| 2688 | 2688 | ||
| 2689 | When calling from a program, pass two arguments; positions (integers | 2689 | When calling from Lisp, pass two arguments START and END: |
| 2690 | or markers) bounding the text that should remain visible. */) | 2690 | positions (integers or markers) bounding the text that should |
| 2691 | remain visible. */) | ||
| 2691 | (register Lisp_Object start, Lisp_Object end) | 2692 | (register Lisp_Object start, Lisp_Object end) |
| 2692 | { | 2693 | { |
| 2693 | CHECK_FIXNUM_COERCE_MARKER (start); | 2694 | CHECK_FIXNUM_COERCE_MARKER (start); |
diff --git a/src/fontset.c b/src/fontset.c index 2729fae6ee9..eec1e0da4cc 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -1444,7 +1444,7 @@ or t for the default fontset. | |||
| 1444 | 1444 | ||
| 1445 | TARGET may be a single character to use FONT-SPEC for. | 1445 | TARGET may be a single character to use FONT-SPEC for. |
| 1446 | 1446 | ||
| 1447 | Target may be a cons (FROM . TO), where FROM and TO are characters. | 1447 | TARGET may be a cons (FROM . TO), where FROM and TO are characters. |
| 1448 | In that case, use FONT-SPEC for all the characters in the range | 1448 | In that case, use FONT-SPEC for all the characters in the range |
| 1449 | between FROM and TO (inclusive). | 1449 | between FROM and TO (inclusive). |
| 1450 | 1450 | ||
diff --git a/src/window.c b/src/window.c index f911c0c7d44..ef2ed638508 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -1796,7 +1796,12 @@ DEFUN ("set-window-start", Fset_window_start, Sset_window_start, 2, 3, 0, | |||
| 1796 | doc: /* Make display in WINDOW start at position POS in WINDOW's buffer. | 1796 | doc: /* Make display in WINDOW start at position POS in WINDOW's buffer. |
| 1797 | WINDOW must be a live window and defaults to the selected one. Return | 1797 | WINDOW must be a live window and defaults to the selected one. Return |
| 1798 | POS. Optional third arg NOFORCE non-nil inhibits next redisplay from | 1798 | POS. Optional third arg NOFORCE non-nil inhibits next redisplay from |
| 1799 | overriding motion of point in order to display at this exact start. */) | 1799 | overriding motion of point in order to display at this exact start. |
| 1800 | |||
| 1801 | For reliable setting of WINDOW start position, make sure point is | ||
| 1802 | at a position that will be visible when that start is in effect, | ||
| 1803 | otherwise there's a chance POS will be disregarded, e.g., if point | ||
| 1804 | winds up in a partially-visible line. */) | ||
| 1800 | (Lisp_Object window, Lisp_Object pos, Lisp_Object noforce) | 1805 | (Lisp_Object window, Lisp_Object pos, Lisp_Object noforce) |
| 1801 | { | 1806 | { |
| 1802 | register struct window *w = decode_live_window (window); | 1807 | register struct window *w = decode_live_window (window); |