summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2015-11-23 17:13:55 +0000
committerAlan Mackenzie <acm@muc.de>2015-11-23 17:13:55 +0000
commitb6bc4ab20cb62edc4ab6dac00918f81781ba1925 (patch)
tree388ce5b5e8295aa6da7954edb0a4a003fea06f5c /lisp/emacs-lisp
parent9f1a5113e103c789e173171ee0cda8d29de2f3d7 (diff)
downloademacs-b6bc4ab20cb62edc4ab6dac00918f81781ba1925.tar.gz
emacs-b6bc4ab20cb62edc4ab6dac00918f81781ba1925.tar.bz2
emacs-b6bc4ab20cb62edc4ab6dac00918f81781ba1925.zip
Signal an error when `setf' gets an odd number of arguments.
* lisp/emacs-lisp/gv.el (setf): Amend.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/gv.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el
index 9e00190e000..1fea38c49c1 100644
--- a/lisp/emacs-lisp/gv.el
+++ b/lisp/emacs-lisp/gv.el
@@ -260,6 +260,8 @@ The return value is the last VAL in the list.
\(fn PLACE VAL PLACE VAL ...)"
(declare (debug (&rest [gv-place form])))
+ (if (/= (logand (length args) 1) 0)
+ (signal 'wrong-number-of-arguments (list 'setf (length args))))
(if (and args (null (cddr args)))
(let ((place (pop args))
(val (car args)))