* emacs-lisp/cl-macs.el (defstruct): Ignore argument to setf
method if slot is read-only.
Fixes: debbugs:9035
+2011-07-16 Lawrence Mitchell <wence@gmx.li>
+
+ * emacs-lisp/cl-macs.el (defstruct): Ignore argument to setf
+ method if slot is read-only (bug#9035).
+
2011-07-16 Martin Rudalics <rudalics@gmx.at>
* frame.el (select-frame-set-input-focus): New argument
(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))
+ (list 'progn '(ignore cl-x)
+ (list 'error
+ (format "%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