"A list of symbols accepted as second argument of `documentation'")
(defparameter *character-replacements*
- '((#\* . "star") (#\/ . "slash") (#\+ . "plus"))
+ '((#\* . "star") (#\/ . "slash") (#\+ . "plus")
+ (#\< . "lt") (#\> . "gt"))
"Characters and their replacement names that `alphanumize' uses. If
the replacements contain any of the chars they're supposed to replace,
you deserve to lose.")
(defmethod specializer-name ((specializer class))
(class-name specializer))
+(defun ensure-class-precedence-list (class)
+ (unless (class-finalized-p class)
+ (finalize-inheritance class))
+ (class-precedence-list class))
+
(defun specialized-lambda-list (method)
;; courtecy of AMOP p. 61
(let* ((specializers (method-specializers method))
(children :initarg :children :initform nil :reader get-children)
(package :initform *documentation-package* :reader get-package)))
+(defmethod print-object ((documentation documentation) stream)
+ (print-unreadable-object (documentation stream :type t)
+ (princ (list (get-kind documentation) (get-name documentation)) stream)))
+
(defgeneric make-documentation (x doc-type string))
(defmethod make-documentation ((x package) doc-type string)
((typep fdef 'generic-function)
(assert (or (symbolp name) (setf-name-p name)))
'generic-function)
- (t
+ (fdef
(assert (or (symbolp name) (setf-name-p name)))
'function)))
(children (when (eq kind 'generic-function)
- (collect-gf-documentation fdef))))
+ (collect-gf-documentation fdef))))
(make-instance 'documentation
:name (name x)
:string string
(defun lambda-list (doc)
(case (get-kind doc)
- ((package constant variable type structure class condition)
+ ((package constant variable type structure class condition nil)
nil)
(method
(third (get-name doc)))
;; class precedence list
(format *texinfo-output* "Class precedence list: @code{~(~{@w{~A}~^, ~}~)}~%~%"
(remove-if (lambda (class) (hide-superclass-p name class))
- (mapcar #'class-name (class-precedence-list (find-class name)))))
+ (mapcar #'class-name (ensure-class-precedence-list (find-class name)))))
;; slots
(let ((slots (remove-if (lambda (slot) (hide-slot-p name slot))
(class-direct-slots (find-class name)))))