diff options
author | Philip Kaludercic <philipk@posteo.net> | 2022-08-12 16:05:05 +0200 |
---|---|---|
committer | Philip Kaludercic <philipk@posteo.net> | 2022-08-12 16:05:05 +0200 |
commit | 1823349e6a61b2997b27cdb1ff42c69739693455 (patch) | |
tree | ed09268f8e57ab9196ff59df000c5f1268e09853 /lisp/emacs-lisp/byte-run.el | |
parent | faa7f03b0c5b6d2c51bb185cf5a0f422ba0fb956 (diff) | |
parent | 829b131e5b3ad3b077be9d31215770b251341c68 (diff) | |
download | emacs-1823349e6a61b2997b27cdb1ff42c69739693455.tar.gz emacs-1823349e6a61b2997b27cdb1ff42c69739693455.tar.bz2 emacs-1823349e6a61b2997b27cdb1ff42c69739693455.zip |
Merge remote-tracking branch 'origin/master' into feature/package+vc
Diffstat (limited to 'lisp/emacs-lisp/byte-run.el')
-rw-r--r-- | lisp/emacs-lisp/byte-run.el | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index 9370bd3a097..4a2860cd43d 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el @@ -236,6 +236,20 @@ The return value of this function is not used." (list 'function-put (list 'quote f) ''command-modes (list 'quote val)))) +(defalias 'byte-run--set-interactive-args + #'(lambda (f args &rest val) + (setq args (remove '&optional (remove '&rest args))) + (list 'function-put (list 'quote f) + ''interactive-args + (list + 'quote + (mapcar + (lambda (elem) + (cons + (seq-position args (car elem)) + (cadr elem))) + val))))) + ;; Add any new entries to info node `(elisp)Declare Form'. (defvar defun-declarations-alist (list @@ -255,7 +269,8 @@ If `error-free', drop calls even if `byte-compile-delete-errors' is nil.") (list 'indent #'byte-run--set-indent) (list 'speed #'byte-run--set-speed) (list 'completion #'byte-run--set-completion) - (list 'modes #'byte-run--set-modes)) + (list 'modes #'byte-run--set-modes) + (list 'interactive-args #'byte-run--set-interactive-args)) "List associating function properties to their macro expansion. Each element of the list takes the form (PROP FUN) where FUN is a function. For each (PROP . VALUES) in a function's declaration, |