Merge remote-tracking branch 'origin/master' into feature/android

This commit is contained in:
Po Lu 2023-06-06 07:53:41 +08:00
commit 49ae645624
8 changed files with 47 additions and 15 deletions

View file

@ -165,6 +165,8 @@ DOC is a string where \"FUNCTION\" and \"OLDFUN\" are expected.")
(buffer-string))
usage))))
;; FIXME: How about renaming this to just `eval-interactive-spec'?
;; It's not specific to the advice system.
(defun advice-eval-interactive-spec (spec)
"Evaluate the interactive spec SPEC."
(cond

View file

@ -504,6 +504,13 @@ Used by `emacs-authors-mode' and `emacs-news-mode'."
(progn (forward-line -1) (point))
(point-max)))))
(defun eval-command-interactive-spec (command)
"Evaluate COMMAND's interactive form and return resultant list.
If COMMAND has no interactive form, return nil."
(advice-eval-interactive-spec
(cadr (or (and (symbolp command) (get command 'interactive-form))
(interactive-form command)))))
(provide 'subr-x)
;;; subr-x.el ends here