Skip to content

Commit d31c48f

Browse files
committed
Lambda list in function description
1 parent 6b09ff7 commit d31c48f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/clos/describe.lisp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,12 @@
276276
;;; function
277277
(defmethod describe ((obj function) &optional (stream *standard-output*))
278278
(let ((name (oget obj "fname"))
279+
(lambda-list (oget obj "lambdalist"))
279280
(doc (oget obj "docstring")))
280281
(with-pp-buffer (buf)
281282
(pp/presentation obj 'function stream)
282283
(format buf "Name:~a~%" (if name name "anonimous"))
284+
(format buf "Lambda list:~a~%" lambda-list)
283285
(when doc
284286
(format buf "Documentation: ~a~%" doc))
285287
(flush-pp-buffer buf stream))

src/compiler/compiler.lisp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,13 @@
265265
(ll-optional-arguments-canonical lambda-list))))
266266
(remove nil (mapcar #'third args))))
267267

268-
(defun lambda-name/docstring-wrapper (name docstring code)
268+
(defun lambda-name/docstring-wrapper (name docstring lambda-list code)
269269
(if (or name docstring)
270270
`(selfcall
271271
(var (func ,code))
272272
,(when name `(= (get func "fname") ,name))
273273
,(when docstring `(= (get func "docstring") ,docstring))
274+
(= (get func "lambdalist") ,(prin1-to-string lambda-list))
274275
(return func))
275276
code))
276277

@@ -464,7 +465,7 @@
464465
keyword-arguments
465466
(ll-svars ll)))))
466467

467-
(lambda-name/docstring-wrapper name documentation
468+
(lambda-name/docstring-wrapper name documentation ll
468469
`(named-function ,(jsize-symbol name 'jscl_user_)
469470
(|values| ,@(mapcar (lambda (x)
470471
(translate-variable x))

0 commit comments

Comments
 (0)