Skip to content

Commit 9815459

Browse files
committed
suport class documentation in document
1 parent 1efa2d6 commit 9815459

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/llib/documentation.l

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
(let (slots-str (doc-str ""))
2323
(dolist (slot slots)
2424
(setq slots-str (concatenate string slots-str (format nil "~A " slot))))
25-
(format t "~A" (escape-string (format nil "\\classdesc{~A}{~A}{~A}{}~%" (send cls :name) (send super :name) slots-str)))))
25+
(format t "~A" (escape-string (format nil "\\classdesc{~A}{~A}{~A}{~A}~%" (send cls :name) (send super :name) slots-str (escape-string (documentation (send cls :name))))))))
2626
(write-methoddesc (method args doc)
2727
(let (args-str)
2828
(dolist (arg args)
@@ -71,9 +71,9 @@
7171
(setf (symbol-function 'defclass-org) (symbol-function 'defclass)))
7272
(unless (fboundp 'defun-org)
7373
(setf (symbol-function 'defun-org) (symbol-function 'defun)))
74-
(defmacro defclass (cls &key super slots)
74+
(defmacro defclass (cls &key super slots documentation)
7575
`(progn
76-
(defclass-org ,cls :super ,super :slots ,slots)
76+
(defclass-org ,cls :super ,super :slots ,slots :documentation ,documentation)
7777
(push '(make-class-document ,cls ,super '(,@slots)) *classdoc*)))
7878
(defmacro defun (symbol args &rest body)
7979
`(progn

0 commit comments

Comments
 (0)