changeset 65087:83940123c4b3

(bookmark-after-jump-hook): New hook. (bookmark-jump): Run `bookmark-after-jump-hook'.
author Carsten Dominik <dominik@science.uva.nl>
date Wed, 24 Aug 2005 10:18:29 +0000
parents aaf3a4138958
children f05a048483cc
files lisp/bookmark.el
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/bookmark.el	Wed Aug 24 10:17:14 2005 +0000
+++ b/lisp/bookmark.el	Wed Aug 24 10:18:29 2005 +0000
@@ -1037,6 +1037,10 @@
                    (lambda (x y) (string-lessp (car x) (car y))))))))
 
 
+(defvar bookmark-after-jump-hook nil
+  "Hook run after `bookmark-jump' jumps to a bookmark.
+Useful for example to unhide text in `outline-mode'.")
+
 ;;;###autoload
 (defun bookmark-jump (bookmark)
   "Jump to bookmark BOOKMARK (a point in some file).
@@ -1059,6 +1063,7 @@
     (and cell
          (switch-to-buffer (car cell))
          (goto-char (cdr cell))
+	 (progn (run-hooks 'bookmark-jump-hook) t)
 	 (if bookmark-automatically-show-annotations
              ;; if there is an annotation for this bookmark,
              ;; show it in a buffer.