mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-01 07:10:34 -08:00
(DOCUMENTATION 'F 'FUNCTION) did not work with generic functions
This commit is contained in:
parent
4f50ddd47e
commit
81a076ee92
2 changed files with 31 additions and 11 deletions
|
|
@ -42,6 +42,8 @@ ECL 0.9f
|
|||
|
||||
- Pipes are now opened in character mode (M. Pasternacki)
|
||||
|
||||
- (DOCUMENTATION 'F 'FUNCTION) did not work with generic functions.
|
||||
|
||||
* Foreign function interface (FFI):
|
||||
|
||||
- ext:c-uint-max and ext:c-ulong-max did not have the right bignum value.
|
||||
|
|
|
|||
|
|
@ -431,20 +431,38 @@ q (or Q): quits the inspection.~%~
|
|||
|
||||
(defmethod documentation ((object symbol) doc-type)
|
||||
(when (member doc-type +valid-documentation-types+)
|
||||
(or (when (eq doc-type 'type)
|
||||
(let ((c (find-class object nil)))
|
||||
(and c (documentation c t))))
|
||||
(si::get-documentation object doc-type))))
|
||||
(case doc-type
|
||||
(type
|
||||
(let ((c (find-class object nil)))
|
||||
(if c
|
||||
(documentation c t)
|
||||
(si::get-documentation object doc-type))))
|
||||
(function
|
||||
(if (fboundp object)
|
||||
(documentation (fdefinition object) doc-type)
|
||||
(si::get-documentation object doc-type)))
|
||||
(otherwise
|
||||
(si::get-documentation object doc-type)))))
|
||||
|
||||
(defmethod (setf documentation) (new-value (object symbol) doc-type)
|
||||
(when (member doc-type +valid-documentation-types+)
|
||||
(or (when (eq doc-type 'type)
|
||||
(let ((c (find-class object nil)))
|
||||
(when c
|
||||
(si::set-documentation object 'type nil)
|
||||
(si::set-documentation object 'structure nil)
|
||||
(setf (documentation c t) new-value))))
|
||||
(si::get-documentation object doc-type)))
|
||||
(case doc-type
|
||||
(type
|
||||
(let ((c (find-class object nil)))
|
||||
(if c
|
||||
(progn
|
||||
(si::set-documentation object 'type nil)
|
||||
(si::set-documentation object 'structure nil)
|
||||
(setf (documentation c t) new-value))
|
||||
(si::set-documentation object doc-type new-value))))
|
||||
(function
|
||||
(if (fboundp object)
|
||||
(let ((c (fdefinition object)))
|
||||
(si::set-documentation object 'function nil)
|
||||
(setf (documentation object 'function) new-value))
|
||||
(si::set-documentation object doc-type new-value)))
|
||||
(otherwise
|
||||
(si::set-documentation object doc-type new-value))))
|
||||
new-value)
|
||||
|
||||
(defmethod documentation ((object package) doc-type)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue