[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 b6bc4ab: Signal an error when `setf' gets an odd
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] emacs-25 b6bc4ab: Signal an error when `setf' gets an odd number of arguments. |
Date: |
Mon, 23 Nov 2015 17:13:03 +0000 |
branch: emacs-25
commit b6bc4ab20cb62edc4ab6dac00918f81781ba1925
Author: Alan Mackenzie <address@hidden>
Commit: Alan Mackenzie <address@hidden>
Signal an error when `setf' gets an odd number of arguments.
* lisp/emacs-lisp/gv.el (setf): Amend.
---
lisp/emacs-lisp/gv.el | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el
index 9e00190..1fea38c 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)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 b6bc4ab: Signal an error when `setf' gets an odd number of arguments.,
Alan Mackenzie <=