aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2024-03-16 05:52:31 -0400
committerEli Zaretskii2024-03-16 05:52:31 -0400
commitd60d625f6e76781bc4f3640ec269a051b3ecb1ae (patch)
treed2944fb115818a26f5dcb5d552db310e7613236e
parentcc8a2c57b5eed4045035dfeaf129ce33d7f74733 (diff)
parentc12852bbf61ebb9ae124033deb427b15ce1a2ffb (diff)
downloademacs-d60d625f6e76781bc4f3640ec269a051b3ecb1ae.tar.gz
emacs-d60d625f6e76781bc4f3640ec269a051b3ecb1ae.zip
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
-rw-r--r--doc/lispref/markers.texi7
-rw-r--r--doc/lispref/windows.texi4
-rw-r--r--etc/NEWS5
-rw-r--r--src/window.c12
4 files changed, 20 insertions, 8 deletions
diff --git a/doc/lispref/markers.texi b/doc/lispref/markers.texi
index 3037790692c..28ad0ff73c0 100644
--- a/doc/lispref/markers.texi
+++ b/doc/lispref/markers.texi
@@ -283,6 +283,13 @@ This function returns the position that @var{marker} points to, or
283@code{nil} if it points nowhere. 283@code{nil} if it points nowhere.
284@end defun 284@end defun
285 285
286@defun marker-last-position marker
287This function returns the last known position of @var{marker} in its
288buffer. It behaves like @code{marker-position} with one exception: If
289the buffer of @var{marker} has been killed, it returns the last position
290of @var{marker} in that buffer before it was killed.
291@end defun
292
286@defun marker-buffer marker 293@defun marker-buffer marker
287This function returns the buffer that @var{marker} points into, or 294This function returns the buffer that @var{marker} points into, or
288@code{nil} if it points nowhere. 295@code{nil} if it points nowhere.
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 2e2fdee422b..eef05d94fdb 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -6424,8 +6424,8 @@ windows are restored by @code{window-state-put}.
6424The second argument specifies a list of entries for @emph{all} windows 6424The second argument specifies a list of entries for @emph{all} windows
6425whose previous buffers have been found dead at the time 6425whose previous buffers have been found dead at the time
6426@code{set-window-configuration} or @code{window-state-put} tried to 6426@code{set-window-configuration} or @code{window-state-put} tried to
6427restore it in that window (minibuffer windows are excluded). This means 6427restore them (minibuffer windows are excluded). This means that the
6428that the function may also delete windows which were found live by 6428function may also delete windows which were found live by
6429@code{set-window-configuration}. 6429@code{set-window-configuration}.
6430 6430
6431Each entry in the list that is passed as the second argument to the 6431Each entry in the list that is passed as the second argument to the
diff --git a/etc/NEWS b/etc/NEWS
index a654d2d8d79..8cad9412def 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1816,6 +1816,11 @@ improves performance. Such a Lisp program can then use the
1816It returns the name of a buffer before the last time it was renamed or 1816It returns the name of a buffer before the last time it was renamed or
1817killed. 1817killed.
1818 1818
1819** New primitive 'marker-last-position'.
1820It returns the last position of MARKER in its buffer even if that buffer
1821has been killed.
1822
1823
1819** Functions and variables to transpose sexps 1824** Functions and variables to transpose sexps
1820 1825
1821+++ 1826+++
diff --git a/src/window.c b/src/window.c
index b69f4719d93..748ad9e77d4 100644
--- a/src/window.c
+++ b/src/window.c
@@ -8711,12 +8711,12 @@ third argument is the symbol `configuration' if the windows are
8711restored by `set-window-configuration' and the symbol `state' if the 8711restored by `set-window-configuration' and the symbol `state' if the
8712windows are restored by `window-state-put'. 8712windows are restored by `window-state-put'.
8713 8713
8714The second argument specifies a list of entries for all windows 8714The second argument specifies a list of entries for all windows whose
8715whose previous buffers have been found dead at the time 8715previous buffers have been found dead at the time
8716`set-window-configuration' or `window-state-put' tried to restore it in 8716`set-window-configuration' or `window-state-put' tried to restore them
8717that window (minibuffer windows are excluded). This means that the 8717(minibuffer windows are excluded). This means that the function
8718function specified by this variable may also delete windows which were 8718specified by this variable may also delete windows which were found to
8719found to be alive by `set-window-configuration'. 8719be alive by `set-window-configuration'.
8720 8720
8721Each entry is a list of six values: the window whose buffer was found 8721Each entry is a list of six values: the window whose buffer was found
8722dead, the dead buffer or its name, the positions of window-start and 8722dead, the dead buffer or its name, the positions of window-start and