Function: bookmark--jump-via
bookmark--jump-via is a byte-compiled function defined in
bookmark.el.gz.
Signature
(bookmark--jump-via BOOKMARK-NAME-OR-RECORD DISPLAY-FUNCTION)
Documentation
Handle BOOKMARK-NAME-OR-RECORD, then call DISPLAY-FUNCTION.
DISPLAY-FUNCTION is called with the new buffer as argument.
After calling DISPLAY-FUNCTION, set window point to the point specified
by BOOKMARK-NAME-OR-RECORD, if necessary, run bookmark-after-jump-hook,
and then show any annotations for this bookmark.
Source Code
;; Defined in /usr/src/emacs/lisp/bookmark.el.gz
(defun bookmark--jump-via (bookmark-name-or-record display-function)
"Handle BOOKMARK-NAME-OR-RECORD, then call DISPLAY-FUNCTION.
DISPLAY-FUNCTION is called with the new buffer as argument.
After calling DISPLAY-FUNCTION, set window point to the point specified
by BOOKMARK-NAME-OR-RECORD, if necessary, run `bookmark-after-jump-hook',
and then show any annotations for this bookmark."
(let (buf point)
(save-window-excursion
(bookmark-handle-bookmark bookmark-name-or-record)
(setq buf (current-buffer)
point (point)))
(funcall display-function buf)
(when-let* ((win (get-buffer-window buf 0)))
(set-window-point win point))
(when bookmark-fringe-mark
(let ((overlays (overlays-in (pos-bol) (1+ (pos-bol))))
temp found)
(while (and (not found) (setq temp (pop overlays)))
(when (eq 'bookmark (overlay-get temp 'category))
(setq found t)))
(unless found
(bookmark--set-fringe-mark))))
;; FIXME: we used to only run bookmark-after-jump-hook in
;; `bookmark-jump' itself, but in none of the other commands.
(run-hooks 'bookmark-after-jump-hook)
(when bookmark-automatically-show-annotations
;; if there is an annotation for this bookmark,
;; show it in a buffer.
(bookmark-show-annotation bookmark-name-or-record))))