emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#9357: closed (23.3.50; defstruct format bug)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#9357: closed (23.3.50; defstruct format bug)
Date: Fri, 26 Aug 2011 10:16:02 +0000

Your message dated Fri, 26 Aug 2011 18:13:05 +0800
with message-id <address@hidden>
and subject line Re: bug#9357: 23.3.50; defstruct format bug
has caused the GNU bug report #9357,
regarding 23.3.50; defstruct format bug
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
9357: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9357
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 23.3.50; defstruct format bug Date: Wed, 24 Aug 2011 17:35:30 +0800
Run compile-defun on the following form to see the problem.

(defstruct (state (:conc-name %state-)
                  (:constructor nil)
                  (:copier nil)
                  :named)
  beg end)

Proposed patch:

diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index fcbf028f..896465d8 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -2338,17 +2338,14 @@ (defmacro defstruct (struct &rest descs)
                        (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)
              (push (cons accessor t) side-eff)
              (push (list 'define-setf-method accessor '(cl-x)
                             (if (cadr (memq :read-only (cddr desc)))
-                                (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



--- End Message ---
--- Begin Message --- Subject: Re: bug#9357: 23.3.50; defstruct format bug Date: Fri, 26 Aug 2011 18:13:05 +0800 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3.50 (Mac OS X 10.6.8)
Fixed in 24.1.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]