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.
This commit is contained in:
Mattias Engdegård 2023-02-21 11:46:14 +01:00
parent 68c972cba1
commit 7a59f20a4e
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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)))))