]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix format bug in defstruct
authorLeo Liu <sdl.web@gmail.com>
Fri, 26 Aug 2011 09:52:07 +0000 (17:52 +0800)
committerLeo Liu <sdl.web@gmail.com>
Fri, 26 Aug 2011 09:52:07 +0000 (17:52 +0800)
http://debbugs.gnu.org/9357

lisp/ChangeLog
lisp/emacs-lisp/cl-macs.el

index b922e21681fe43351750052db24e8f0d14c579bf..b82163e516003eb605a5d0fd8ed5f3d51701455a 100644 (file)
@@ -1,3 +1,7 @@
+2011-08-26  Leo Liu  <sdl.web@gmail.com>
+
+       * emacs-lisp/cl-macs.el (defstruct): Fix format.  (Bug#9357)
+
 2011-08-25  Juri Linkov  <juri@jurta.org>
 
        * isearch.el (isearch-occur): Let-bind `search-spaces-regexp' to
index fb19115287c0b3b68da888cdec0875936dd9b098..d9531cc5261f1af5fa48da25992b45bc1f005544 100644 (file)
@@ -2416,9 +2416,8 @@ value, that slot cannot be set via `setf'.
                        (append
                         (and pred-check
                              (list (list 'or pred-check
-                                         (list 'error
-                                               (format "%s accessing a non-%s"
-                                                       accessor name)))))
+                                         `(error "%s accessing a non-%s"
+                                                 ',accessor ',name))))
                         (list (if (eq type 'vector) (list 'aref 'cl-x pos)
                                 (if (= pos 0) '(car cl-x)
                                   (list 'nth pos 'cl-x)))))) forms)
@@ -2426,9 +2425,8 @@ value, that slot cannot be set via `setf'.
              (push (list 'define-setf-method accessor '(cl-x)
                             (if (cadr (memq :read-only (cddr desc)))
                                  (list 'progn '(ignore cl-x)
-                                       (list 'error
-                                             (format "%s is a read-only slot"
-                                                     'accessor)))
+                                       `(error "%s is a read-only slot"
+                                              ',accessor))
                               ;; If cl is loaded only for compilation,
                               ;; the call to cl-struct-setf-expander would
                               ;; cause a warning because it may not be