From cf5aaae90bd3961171e9edef6ee1f97b98c266a6 Mon Sep 17 00:00:00 2001 From: shipmints Date: Wed, 19 Mar 2025 16:58:55 +0100 Subject: [PATCH] Promote bookmark-handler prop 'bookmark-inhibit to list (bug#65039) * lisp/bookmark.el (bookmark-insert): * lisp/shell.el (#'shell-bookmark-jump): The bookmark-handler property 'bookmark-inhibit is now a list. --- lisp/bookmark.el | 10 +++++----- lisp/shell.el | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 99bb26e83cc..0de42bcea51 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -1523,8 +1523,8 @@ name." (defun bookmark-insert (bookmark-name) "Insert the text of the file pointed to by bookmark BOOKMARK-NAME. BOOKMARK-NAME is a bookmark name (a string), not a bookmark record. -Refuse to insert bookmarks whose handlers have the property -`bookmark-inhibit' eq `insert'. +Refuse to insert bookmarks if its handler's property `bookmark-inhibit', +which is a list, contains `insert'. You may have a problem using this function if the value of variable `bookmark-alist' is nil. If that happens, you need to load in some @@ -1533,9 +1533,9 @@ this." (interactive (list (bookmark-completing-read "Insert bookmark contents"))) (bookmark-maybe-historicize-string bookmark-name) (bookmark-maybe-load-default-file) - (if (eq 'insert (get (or (bookmark-get-handler bookmark-name) - #'bookmark-default-handler) - 'bookmark-inhibit)) + (if (memq 'insert (get (or (bookmark-get-handler bookmark-name) + #'bookmark-default-handler) + 'bookmark-inhibit)) (error "Insert not supported for bookmark %s" bookmark-name) (let ((orig-point (point)) (str-to-insert diff --git a/lisp/shell.el b/lisp/shell.el index a35a0840651..09d4161ba7a 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -1985,7 +1985,7 @@ be created if necessary, and new remote connections are inhibited." (delq (assoc "7" ansi-osc-handlers) ; ansi-osc-directory-tracker ansi-osc-handlers)))))) (put #'shell-bookmark-jump 'bookmark-handler-type "Shell") -(put #'shell-bookmark-jump 'bookmark-inhibit 'insert) +(put #'shell-bookmark-jump 'bookmark-inhibit '(insert)) (provide 'shell)