From tayloj at cs.rpi.edu Wed Aug 4 15:41:35 2010 From: tayloj at cs.rpi.edu (Joshua TAYLOR) Date: Wed, 4 Aug 2010 11:41:35 -0400 Subject: [cldoc-devel] Patch for handle-slots in cludg.lisp Message-ID: Here's a little bugfix for handle-slots in cludg.lisp. The current version chokes on slot-specifiers that are just the name of the slot, e.g., in (defclass foo () (slot1 slot2 slot3)). The update just makes sure that each slot-specifier is a list (using listify, which was already present in handle-slots). @@ -865,7 +865,7 @@ when (eq key :initarg) collect value into initargs end finally (return (list readers writers accessors initargs)))) (listify (a) (if (listp a) a (list a)))) - (loop for slot in (mapcar #'listify slots) + (loop for slot in slots for options = (cdr slot) for (readers writers accessors initargs) = (get-repeated options) collect //JT From tayloj at cs.rpi.edu Thu Aug 5 18:22:51 2010 From: tayloj at cs.rpi.edu (Joshua TAYLOR) Date: Thu, 5 Aug 2010 14:22:51 -0400 Subject: [cldoc-devel] Fix for cludg.lisp / find-qualifiers-and-lambda-list Message-ID: The current implementation of find-qualifiers-and-lambda-list, (defun find-qualifiers-and-lambda-list (forms) "Returns the list of qualifiers if any and the arguments lambda-list." (loop for form in forms if (keywordp form) collect form into qualifiers else do (loop-finish) finally (return (values qualifiers form)))) doesn't work for non-keyword qualifiers, such as are present for methods with a non-standard method combination. The syntax for defmethod is such that rather than checking for keywords, checking for lists work. defmethod function-name {method-qualifier}* specialized-lambda-list [[declaration* | documentation]] form* method-qualifier::= non-list Here's a version of find-qualifiers-and-lambda-list that handles the general case of method-qualifiers: (defun find-qualifiers-and-lambda-list (forms) "Returns the list of qualifiers if any and the arguments lambda-list." (do ((qualifiers '() (list* (first forms) qualifiers)) (forms forms (rest forms))) ((listp (first forms)) (values (nreverse qualifiers) (first forms))))) -- Joshua Taylor, http://www.cs.rpi.edu/~tayloj/ From hatchond at yahoo.fr Wed Aug 11 13:07:07 2010 From: hatchond at yahoo.fr (Iban HATCHONDO) Date: Wed, 11 Aug 2010 13:07:07 +0000 (GMT) Subject: [cldoc-devel] Re : Patch for handle-slots in cludg.lisp In-Reply-To: References: Message-ID: <467215.33013.qm@web27608.mail.ukl.yahoo.com> Hi Joshua, Thanks for the patch. I'm adding this to handle-slots as well as the second patch you're proposing. I've indeed missed this short coding option and the custom method qualifiers. Thanks a lot. Do not hesitate if you have any other patches. Best, Iban. ----- Message d'origine ---- De : Joshua TAYLOR ? : cldoc-devel at common-lisp.net Envoy? le : Mer 4 ao?t 2010, 17h 41min 35s Objet : [cldoc-devel] Patch for handle-slots in cludg.lisp Here's a little bugfix for handle-slots in cludg.lisp. The current version chokes on slot-specifiers that are just the name of the slot, e.g., in (defclass foo () (slot1 slot2 slot3)). The update just makes sure that each slot-specifier is a list (using listify, which was already present in handle-slots). @@ -865,7 +865,7 @@ when (eq key :initarg) collect value into initargs end finally (return (list readers writers accessors initargs)))) (listify (a) (if (listp a) a (list a)))) - (loop for slot in (mapcar #'listify slots) + (loop for slot in slots for options = (cdr slot) for (readers writers accessors initargs) = (get-repeated options) collect //JT _______________________________________________ cldoc-devel mailing list cldoc-devel at common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/cldoc-devel