[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug with :accessor-prefix
- To: CommonLoops.pa@Xerox.COM
- Subject: bug with :accessor-prefix
- From: Gregor.pa@Xerox.COM
- Date: Thu, 25 Aug 88 16:24 PDT
- Fcc: BD:>Gregor>mail>outgoing-mail-3.text.newest
- Line-fold: no
The 8/24 version has a bug which crops up when the :accessor-prefix
option is used with no argument. I am somewhat loathe to fix this since
:accessor-prefix is now obsolete, but here is the fix.
The version on arisia has been modified to include this patch.
;from defclass.lisp
(defun merge-accessor/reader-prefixes (slotds class-options)
(dolist (class-option class-options)
(flet ((do-prefix (slot-name)
(if (cadr class-option)
(symbol-append (cadr class-option) slot-name)
slot-name)))
(when (listp class-option)
(case (car class-option)
(:accessor-prefix
(dolist (slotd slotds)
(let ((name (do-prefix (slotd-name slotd))))
(pushnew name (slotd-readers slotd))
(pushnew `(setf ,name) (slotd-writers slotd)
:test #'equal))))
(:reader-prefix
(dolist (slotd slotds)
(let ((name (do-prefix (slotd-name slotd))))
(pushnew name (slotd-readers slotd))))))))))
-------