mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
(bookmark--jump-via): Ensure 'window-point' is set correctly
* lisp/bookmark.el (bookmark--jump-via): Record bookmark-prescribed point before calling DISPLAY-FUNCTION, and use it to set 'window-point' afterwards. (Bug#71603)
This commit is contained in:
parent
a5a374014f
commit
27f46ba4b9
1 changed files with 6 additions and 4 deletions
|
|
@ -1265,10 +1265,12 @@ After calling DISPLAY-FUNCTION, set window point to the point specified
|
||||||
by BOOKMARK-NAME-OR-RECORD, if necessary, run `bookmark-after-jump-hook',
|
by BOOKMARK-NAME-OR-RECORD, if necessary, run `bookmark-after-jump-hook',
|
||||||
and then show any annotations for this bookmark."
|
and then show any annotations for this bookmark."
|
||||||
(bookmark-handle-bookmark bookmark-name-or-record)
|
(bookmark-handle-bookmark bookmark-name-or-record)
|
||||||
(save-current-buffer
|
;; Store `point' now, because `display-function' might change it.
|
||||||
(funcall display-function (current-buffer)))
|
(let ((point (point)))
|
||||||
(let ((win (get-buffer-window (current-buffer) 0)))
|
(save-current-buffer
|
||||||
(if win (set-window-point win (point))))
|
(funcall display-function (current-buffer)))
|
||||||
|
(let ((win (get-buffer-window (current-buffer) 0)))
|
||||||
|
(if win (set-window-point win point))))
|
||||||
;; FIXME: we used to only run bookmark-after-jump-hook in
|
;; FIXME: we used to only run bookmark-after-jump-hook in
|
||||||
;; `bookmark-jump' itself, but in none of the other commands.
|
;; `bookmark-jump' itself, but in none of the other commands.
|
||||||
(when bookmark-fringe-mark
|
(when bookmark-fringe-mark
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue