]> git.eshelyaron.com Git - emacs.git/commitdiff
(bookmark-after-jump-hook): New hook.
authorCarsten Dominik <dominik@science.uva.nl>
Wed, 24 Aug 2005 10:18:29 +0000 (10:18 +0000)
committerCarsten Dominik <dominik@science.uva.nl>
Wed, 24 Aug 2005 10:18:29 +0000 (10:18 +0000)
(bookmark-jump): Run `bookmark-after-jump-hook'.

lisp/bookmark.el

index da8a4e2b809208efded06b12c280b497b92e75a6..043b8d54d1be7db74eaffa2afbd11c93ca570f98 100644 (file)
@@ -1037,6 +1037,10 @@ For example, if this is a Info buffer, return the Info file's name."
                    (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 @@ of the old one in the permanent bookmark record."
     (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.