[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Constructed docstrings for closures
From: |
Stefan Monnier |
Subject: |
Constructed docstrings for closures |
Date: |
Fri, 16 Jan 2015 11:18:26 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
When converting backquoted lambdas to closures, I've often bumped into
the following problem:
`(lambda (foo bar)
,(concat "Toto is very " blabla ".")
(code using foo and bar (and ',blabla as well)))
So code-wise, this can be replaced by a closure just fine, but doc-wise
we don't have a way to construct a different docstring for
every closure.
I'd like to lift this restriction by offering a new feature that lets us
do something like:
(lambda (foo bar)
<something-magical-here>
(code using foo and bar (and blabla as well)))
and get the closure we want with the docstring we want.
Does anyone have an idea of what the <something-magical-here>
could/should be?
Stefan