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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user