org-attach: Extend range for org-attach-commands

* lisp/org-attach.el (org-attach): Get rid of the use of the second
arg of `commandp`, by making `org-attach-commands` accept any
commands (including keyboard macros).

Patch from Stefan Monnier.
https://list.orgmode.org/jwvwni7y70r.fsf-monnier+emacs@gnu.org/
This commit is contained in:
Marco Wahl 2022-02-06 23:57:14 +01:00
parent 4fdfe9c584
commit 28da0649e6
1 changed files with 2 additions and 2 deletions

View File

@ -320,8 +320,8 @@ Shows a list of commands and prompts for another key to execute a command."
(let ((command (cl-some (lambda (entry)
(and (memq c (nth 0 entry)) (nth 1 entry)))
org-attach-commands)))
(if (commandp command t)
(call-interactively command)
(if (commandp command)
(command-execute command)
(error "No such attachment command: %c" c))))))
(defun org-attach-dir (&optional create-if-not-exists-p no-fs-check)