From: Carsten Dominik Date: Wed, 24 Aug 2005 10:18:29 +0000 (+0000) Subject: (bookmark-after-jump-hook): New hook. X-Git-Tag: emacs-pretest-22.0.90~7482 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=866a7257074ddd50ee36f5989345d4abcce08b79;p=emacs.git (bookmark-after-jump-hook): New hook. (bookmark-jump): Run `bookmark-after-jump-hook'. --- 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." (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.