1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

* lisp/emacs-lisp/bytecomp.el (featurep): Safer comp-time evaluation

This commit is contained in:
Mattias Engdegård 2025-08-31 19:05:36 +02:00
parent 66ef930ebe
commit 7c6de4fe73

View file

@ -5881,11 +5881,11 @@ and corresponding effects."
;;; Core compiler macros.
(put 'featurep 'compiler-macro
(lambda (form feature &rest _ignore)
(lambda (form feature &rest rest)
;; Emacs-21's byte-code doesn't run under XEmacs or SXEmacs anyway, so
;; we can safely optimize away this test.
(if (member feature '('xemacs 'sxemacs 'emacs))
(eval form)
(if (and (member feature '('xemacs 'sxemacs 'emacs)) (not rest))
(featurep feature)
form)))
;; Report comma operator used outside of backquote.