1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-03 18:41:25 -08:00

Make (let ((:key 'foo)) :key) signal an error in lexical elisp, too

* src/lread.c (intern_sym): Mark keywords as special (bug#38872).
This commit is contained in:
Lars Ingebrigtsen 2020-09-20 21:30:54 +02:00
parent 300a5a5757
commit dc2168ebf2

View file

@ -4104,6 +4104,9 @@ intern_sym (Lisp_Object sym, Lisp_Object obarray, Lisp_Object index)
{
make_symbol_constant (sym);
XSYMBOL (sym)->u.s.redirect = SYMBOL_PLAINVAL;
/* Mark keywords as special. This makes (let ((:key 'foo)) ...)
in lexically bound elisp signal an error, as documented. */
XSYMBOL (sym)->u.s.declared_special = true;
SET_SYMBOL_VAL (XSYMBOL (sym), sym);
}