]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/gv.el
Merge branch 'emacs-25-merge'
[gnu-emacs] / lisp / emacs-lisp / gv.el
index 67609820a332e3e4350aa0fab059aea1e40fac1e..1fea38c49c1b544f5216204de55ad014130bf4fd 100644 (file)
@@ -233,13 +233,13 @@ turned into calls of the form (SETTER ARGS... VAL).
 
 If FIX-RETURN is non-nil, then SETTER is not assumed to return VAL and
 instead the assignment is turned into something equivalent to
-  \(let ((temp VAL))
+  (let ((temp VAL))
     (SETTER ARGS... temp)
     temp)
 so as to preserve the semantics of `setf'."
   (declare (debug (sexp (&or symbolp lambda-expr) &optional sexp)))
   (when (eq 'lambda (car-safe setter))
-    (message "Use ‘gv-define-setter’ or name %s's setter function" name))
+    (message "Use `gv-define-setter' or name %s's setter function" name))
   `(gv-define-setter ,name (val &rest args)
      ,(if fix-return
           `(macroexp-let2 nil v val
@@ -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)))
@@ -534,7 +536,7 @@ This macro only makes sense when used in a place."
   "Return a reference to PLACE.
 This is like the `&' operator of the C language.
 Note: this only works reliably with lexical binding mode, except for very
-simple PLACEs such as (function-symbol 'foo) which will also work in dynamic
+simple PLACEs such as (function-symbol \\='foo) which will also work in dynamic
 binding mode."
   (let ((code
          (gv-letplace (getter setter) place