diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2008-10-29 17:42:49 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2008-10-29 17:42:49 +0000 |
commit | 73ba5f6dedc31a74556c81c524011bcb8c36e02b (patch) | |
tree | 3b2e22f627cc47f20839edb531890f3f5727c007 /lisp | |
parent | de4dc6067a0c28dab46eaffa0f10527f361de301 (diff) | |
download | emacs-73ba5f6dedc31a74556c81c524011bcb8c36e02b.tar.gz emacs-73ba5f6dedc31a74556c81c524011bcb8c36e02b.tar.bz2 emacs-73ba5f6dedc31a74556c81c524011bcb8c36e02b.zip |
(bookmark-handle-bookmark): Rename from bookmark-jump-noselect.
(bookmark--jump-via, bookmark-insert): Callers changed.
(bookmark-jump-noselect): Wrapper function for bookmark-handle-bookmark.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/bookmark.el | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 8ac1226ec76..a6ebc99b6f7 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -934,7 +934,7 @@ Default to file name if it's nil." Useful for example to unhide text in `outline-mode'.") (defun bookmark--jump-via (bookmark display-function) - (bookmark-jump-noselect bookmark) + (bookmark-handle-bookmark bookmark) (save-current-buffer (funcall display-function (current-buffer))) (let ((win (get-buffer-window (current-buffer) 0))) @@ -1003,7 +1003,15 @@ be retrieved from a VC backend, else return nil." ;; Last possibility: try VC (if (vc-backend file) file)))) +;; This function is present for Emacs 22 compatibility only. (defun bookmark-jump-noselect (bookmark) + "Return the location pointed to by the bookmark BOOKMARK. +The return value has the form (BUFFER . POINT)." + (save-excursion + (bookmark-handle-bookmark bookmark) + (cons (current-buffer) (point)))) + +(defun bookmark-handle-bookmark (bookmark) "Call BOOKMARK's handler or `bookmark-default-handler' if it has none. Changes current buffer and point and returns nil, or signals a `file-error'. BOOKMARK can be a bookmark record used internally by some other @@ -1177,7 +1185,7 @@ this." (let ((orig-point (point)) (str-to-insert (save-current-buffer - (bookmark-jump-noselect bookmark) + (bookmark-handle-bookmark bookmark) (buffer-string)))) (insert str-to-insert) (push-mark) |