Function: treemacs--make-bookmark-record
treemacs--make-bookmark-record is a byte-compiled function defined in
treemacs-bookmarks.el.
Signature
(treemacs--make-bookmark-record)
Documentation
Make a bookmark record for the current Treemacs button.
This function is installed as the bookmark-make-record-function.
Source Code
;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-bookmarks.el
(defun treemacs--make-bookmark-record ()
"Make a bookmark record for the current Treemacs button.
This function is installed as the `bookmark-make-record-function'."
(treemacs-unless-let (current-btn (treemacs-current-button))
(progn
;; Don't rely on treemacs-pulse-on-failure to display the error, since the
;; error must be handled in bookmark.el.
(treemacs-pulse-on-failure)
(user-error "Nothing to bookmark here"))
(let* ((path (treemacs-button-get current-btn :path)))
(unless path
(treemacs-pulse-on-failure)
(user-error "Could not find the path of the current button"))
`((defaults . (,(treemacs--format-bookmark-title current-btn)))
(treemacs-bookmark-path . ,path)
(handler . treemacs--bookmark-handler)
,@(when (stringp path) `((filename . ,path)))))))