1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-10 08:10:21 -08:00

Fix unsafep for aliases to side-effect-free functions

* lisp/emacs-lisp/unsafep.el (unsafep-function):
Follow aliases when reading the `side-effect-free` property.
This commit is contained in:
Mattias Engdegård 2023-02-24 15:12:40 +01:00
parent 1defa5000b
commit 4849e74273

View file

@ -237,7 +237,7 @@ Otherwise result is a reason code."
((eq (car-safe fun) 'lambda)
(unsafep fun unsafep-vars))
((not (and (symbolp fun)
(or (get fun 'side-effect-free)
(or (function-get fun 'side-effect-free)
(eq (get fun 'safe-function) t)
(eq safe-functions t)
(memq fun safe-functions))))