* bug#9357: 23.3.50; defstruct format bug
@ 2011-08-24 9:35 Leo
2011-08-26 10:13 ` Leo
0 siblings, 1 reply; 2+ messages in thread
From: Leo @ 2011-08-24 9:35 UTC (permalink / raw
To: 9357
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#9357: 23.3.50; defstruct format bug
2011-08-24 9:35 bug#9357: 23.3.50; defstruct format bug Leo
@ 2011-08-26 10:13 ` Leo
0 siblings, 0 replies; 2+ messages in thread
From: Leo @ 2011-08-26 10:13 UTC (permalink / raw
To: 9357-done
Fixed in 24.1.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-26 10:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-24 9:35 bug#9357: 23.3.50; defstruct format bug Leo
2011-08-26 10:13 ` Leo
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.