From: Eshel Yaron Date: Sun, 2 Jun 2024 11:15:38 +0000 (+0200) Subject: Add 'minibuffer-action' for 'bookmark-jump' X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7783272fd3ec22ec53319f402280758fd07caa0a;p=emacs.git Add 'minibuffer-action' for 'bookmark-jump' --- diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 25a544ce3ac..42fdbc9ca85 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -1342,6 +1342,16 @@ and then show any annotations for this bookmark." ;; show it in a buffer. (bookmark-show-annotation bookmark-name-or-record))) +;;;###autoload +(defun bookmark-display (bookmark) + "Display BOOKMARK." + (interactive + (list + (bookmark-completing-read "Display bookmark" bookmark-current-bookmark))) + (unless bookmark (user-error "You didn't specify a bookmark")) + (bookmark-jump bookmark #'display-buffer)) + +(put 'bookmark-display 'minibuffer-action "display") ;;;###autoload (defun bookmark-jump (bookmark &optional display-func) @@ -1372,6 +1382,7 @@ DISPLAY-FUNC would be `switch-to-buffer-other-window'." ;; `switch-to-buffer-preserve-window-point' is non-nil. (bookmark--jump-via bookmark (or display-func 'pop-to-buffer-same-window))) +(put 'bookmark-jump 'minibuffer-action 'bookmark-display) ;;;###autoload (defun bookmark-jump-other-window (bookmark)