diff options
author | shipmints <shipmints@gmail.com> | 2025-03-19 16:58:55 +0100 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2025-03-19 16:58:55 +0100 |
commit | cf5aaae90bd3961171e9edef6ee1f97b98c266a6 (patch) | |
tree | 4ec58b4acc6e9d6e3d9f4a485ae722c4baa90326 | |
parent | f6632114fe661930c45b5e9c1bf66644be095ff9 (diff) | |
download | emacs-cf5aaae90bd3961171e9edef6ee1f97b98c266a6.tar.gz emacs-cf5aaae90bd3961171e9edef6ee1f97b98c266a6.tar.bz2 emacs-cf5aaae90bd3961171e9edef6ee1f97b98c266a6.zip |
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.
-rw-r--r-- | lisp/bookmark.el | 10 | ||||
-rw-r--r-- | 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) |