Function: magit--handle-bookmark
magit--handle-bookmark is an autoloaded and byte-compiled function
defined in magit-section.el.
Signature
(magit--handle-bookmark BOOKMARK)
Documentation
Open a bookmark created by magit--make-bookmark.
Call the generic function magit-bookmark-get-buffer-create to get
the appropriate buffer without displaying it.
Then call the magit-*-setup-buffer function of the the major-mode
with the variables' values as arguments, which were recorded by
magit--make-bookmark.
Source Code
;; Defined in ~/.emacs.d/elpa/magit-section-20260330.1102/magit-section.el
;;;###autoload
(defun magit--handle-bookmark (bookmark)
"Open a bookmark created by `magit--make-bookmark'.
Call the generic function `magit-bookmark-get-buffer-create' to get
the appropriate buffer without displaying it.
Then call the `magit-*-setup-buffer' function of the the major-mode
with the variables' values as arguments, which were recorded by
`magit--make-bookmark'."
(require (quote magit-bookmark) nil t)
(let ((buffer (magit-bookmark-get-buffer-create
bookmark
(bookmark-prop-get bookmark 'mode))))
(set-buffer buffer) ; That is the interface we have to adhere to.
(when-let ((hidden (bookmark-prop-get bookmark 'magit-hidden-sections)))
(with-current-buffer buffer
(dolist (child (oref magit-root-section children))
(if (member (cons (oref child type)
(oref child value))
hidden)
(magit-section-hide child)
(magit-section-show child)))))
;; Compatibility with `bookmark+' package. See #4356.
(when (bound-and-true-p bmkp-jump-display-function)
(funcall bmkp-jump-display-function (current-buffer)))
nil))