aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Dominik2005-08-24 10:18:29 +0000
committerCarsten Dominik2005-08-24 10:18:29 +0000
commit866a7257074ddd50ee36f5989345d4abcce08b79 (patch)
treebfaedfd9fd886c3afabdce7c0c093d95a80cf41d
parent6cd70a8cb5c71792148659aa15ac7a5c40479765 (diff)
downloademacs-866a7257074ddd50ee36f5989345d4abcce08b79.tar.gz
emacs-866a7257074ddd50ee36f5989345d4abcce08b79.zip
(bookmark-after-jump-hook): New hook.
(bookmark-jump): Run `bookmark-after-jump-hook'.
-rw-r--r--lisp/bookmark.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index da8a4e2b809..043b8d54d1b 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -1037,6 +1037,10 @@ For example, if this is a Info buffer, return the Info file's name."
1037 (lambda (x y) (string-lessp (car x) (car y)))))))) 1037 (lambda (x y) (string-lessp (car x) (car y))))))))
1038 1038
1039 1039
1040(defvar bookmark-after-jump-hook nil
1041 "Hook run after `bookmark-jump' jumps to a bookmark.
1042Useful for example to unhide text in `outline-mode'.")
1043
1040;;;###autoload 1044;;;###autoload
1041(defun bookmark-jump (bookmark) 1045(defun bookmark-jump (bookmark)
1042 "Jump to bookmark BOOKMARK (a point in some file). 1046 "Jump to bookmark BOOKMARK (a point in some file).
@@ -1059,6 +1063,7 @@ of the old one in the permanent bookmark record."
1059 (and cell 1063 (and cell
1060 (switch-to-buffer (car cell)) 1064 (switch-to-buffer (car cell))
1061 (goto-char (cdr cell)) 1065 (goto-char (cdr cell))
1066 (progn (run-hooks 'bookmark-jump-hook) t)
1062 (if bookmark-automatically-show-annotations 1067 (if bookmark-automatically-show-annotations
1063 ;; if there is an annotation for this bookmark, 1068 ;; if there is an annotation for this bookmark,
1064 ;; show it in a buffer. 1069 ;; show it in a buffer.