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

bug with :accessor-prefix

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)
      (when (listp class-option)
	(case (car class-option)
	    (dolist (slotd slotds)
	      (let ((name (do-prefix (slotd-name slotd))))
		(pushnew name (slotd-readers slotd))
		(pushnew `(setf ,name) (slotd-writers slotd)
			 :test #'equal))))
	    (dolist (slotd slotds)
	      (let ((name (do-prefix (slotd-name slotd))))
		(pushnew name (slotd-readers slotd))))))))))