From: Mattias EngdegÄrd Date: Tue, 21 Feb 2023 10:46:14 +0000 (+0100) Subject: Follow aliases for `interactive-only` declarations X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7a59f20a4e5aefb8bd007275efbcf4e658d77ac0;p=emacs.git Follow aliases for `interactive-only` declarations Make `interactive-only` declarations apply to aliases of the same function as well since this quality isn't in the name but in what the function does. * lisp/emacs-lisp/bytecomp.el (byte-compile-form): * lisp/help-fns.el (help-fns--interactive-only): Follow aliases when retrieving the `interactive-only` property. --- diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index a0e124bcf1b..b1410fc2646 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -3416,7 +3416,7 @@ lambda-expression." (let* ((fn (car form)) (handler (get fn 'byte-compile)) (interactive-only - (or (get fn 'interactive-only) + (or (function-get fn 'interactive-only) (memq fn byte-compile-interactive-only-functions)))) (when (memq fn '(set symbol-value run-hooks ;; add-to-list add-hook remove-hook run-hook-with-args diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 1172f068934..84266e02901 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -769,7 +769,7 @@ the C sources, too." (and (symbolp function) (not (eq (car-safe (symbol-function function)) 'macro)) (let* ((interactive-only - (or (get function 'interactive-only) + (or (function-get function 'interactive-only) (if (boundp 'byte-compile-interactive-only-functions) (memq function byte-compile-interactive-only-functions)))))