branch: elpa/git-commit commit 91e6698435b9aadb89620d443444d2ec34a5efce Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
Avoid loading bookmark upfront --- lisp/magit-mode.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el index 132ea615f6..7956e8565a 100644 --- a/lisp/magit-mode.el +++ b/lisp/magit-mode.el @@ -31,7 +31,6 @@ (require 'magit-base) (require 'magit-git) -(require 'bookmark) (require 'format-spec) (require 'help-mode) (require 'transient) @@ -1480,11 +1479,18 @@ mentioned caches completely." ;;; Bookmark support +(declare-function bookmark-get-filename "bookmark" (bookmark-name-or-record)) +(declare-function bookmark-make-record-default "bookmark" + (&optional no-file no-context posn)) +(declare-function bookmark-prop-get "bookmark" (bookmark-name-or-record prop)) +(declare-function bookmark-prop-set "bookmark" (bookmark-name-or-record prop val)) + (defun magit--make-bookmark () "Create a bookmark for the current Magit buffer. Input values are the major-mode's `magit-bookmark-name' method, and the buffer-local values of the variables referenced in its `magit-bookmark-variables' property." + (require 'bookmark) (if (plist-member (symbol-plist major-mode) 'magit-bookmark-variables) ;; `bookmark-make-record-default's return value does not match ;; (NAME . ALIST), even though it is used as the default value