Commit 2b8154f2 authored by Alan Mackenzie's avatar Alan Mackenzie
Browse files

Signal an error when `setq' has an odd number of arguments. Fixes bug#20241.

* src/eval.c (Fsetq): Signal an error on an odd number of arguments.
(syms_of_eval): Add a DEFSYM for Qsetq.
parent 3264a26d
......@@ -487,6 +487,10 @@ usage: (setq [SYM VAL]...) */)
if (CONSP (args))
{
Lisp_Object args_left = args;
Lisp_Object numargs = Flength (args);
if (XINT (numargs) & 1)
xsignal2 (Qwrong_number_of_arguments, Qsetq, numargs);
do
{
......@@ -3654,6 +3658,7 @@ To prevent this happening, set `quit-flag' to nil
before making `inhibit-quit' nil. */);
Vinhibit_quit = Qnil;
DEFSYM (Qsetq, "setq");
DEFSYM (Qinhibit_quit, "inhibit-quit");
DEFSYM (Qautoload, "autoload");
DEFSYM (Qinhibit_debugger, "inhibit-debugger");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment