emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 f64c277: Let bookmark-jump override window-point


From: Noam Postavsky
Subject: [Emacs-diffs] emacs-26 f64c277: Let bookmark-jump override window-point (Bug#31751)
Date: Tue, 24 Jul 2018 08:56:09 -0400 (EDT)

branch: emacs-26
commit f64c2774e96c755a5fddcbc49db65dcc3fcb9323
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>

    Let bookmark-jump override window-point (Bug#31751)
    
    * lisp/bookmark.el (bookmark-jump): Use pop-to-buffer-same-window
    instead of switch-to-buffer, the latter obeys
    switch-to-buffer-preserve-window-point and so loses the bookmark's
    point.
---
 lisp/bookmark.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 1a2ec1e..9299ab8 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -1102,7 +1102,7 @@ BOOKMARK is usually a bookmark name (a string).  It can 
also be a
 bookmark record, but this is usually only done by programmatic callers.
 
 If DISPLAY-FUNC is non-nil, it is a function to invoke to display the
-bookmark.  It defaults to `switch-to-buffer'.  A typical value for
+bookmark.  It defaults to `pop-to-buffer-same-window'.  A typical value for
 DISPLAY-FUNC would be `switch-to-buffer-other-window'."
   (interactive
    (list (bookmark-completing-read "Jump to bookmark"
@@ -1110,7 +1110,7 @@ DISPLAY-FUNC would be `switch-to-buffer-other-window'."
   (unless bookmark
     (error "No bookmark specified"))
   (bookmark-maybe-historicize-string bookmark)
-  (bookmark--jump-via bookmark (or display-func 'switch-to-buffer)))
+  (bookmark--jump-via bookmark (or display-func 'pop-to-buffer-same-window)))
 
 
 ;;;###autoload



reply via email to

[Prev in Thread] Current Thread [Next in Thread]