[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/bookmark.el,v
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/bookmark.el,v |
Date: |
Wed, 29 Oct 2008 17:42:49 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 08/10/29 17:42:49
Index: bookmark.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/bookmark.el,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -b -r1.116 -r1.117
--- bookmark.el 6 Oct 2008 11:50:02 -0000 1.116
+++ bookmark.el 29 Oct 2008 17:42:49 -0000 1.117
@@ -934,7 +934,7 @@
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 @@
;; 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 @@
(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)