projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
300a5a5
)
Make (let ((:key 'foo)) :key) signal an error in lexical elisp, too
author
Lars Ingebrigtsen
<larsi@gnus.org>
Sun, 20 Sep 2020 19:30:54 +0000
(21:30 +0200)
committer
Lars Ingebrigtsen
<larsi@gnus.org>
Sun, 20 Sep 2020 19:30:54 +0000
(21:30 +0200)
* src/lread.c (intern_sym): Mark keywords as special (bug#38872).
src/lread.c
patch
|
blob
|
history
diff --git
a/src/lread.c
b/src/lread.c
index 8064bf4d0eb4ef607757658d72c5c72d5548ed81..4b788e99407dc8fa68ebbaf5e655849dd686f17c 100644
(file)
--- a/
src/lread.c
+++ b/
src/lread.c
@@
-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);
}