unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: emacs-devel@gnu.org
Subject: Constructed docstrings for closures
Date: Fri, 16 Jan 2015 11:18:26 -0500	[thread overview]
Message-ID: <jwvsifasnzb.fsf-monnier+emacs@gnu.org> (raw)

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



             reply	other threads:[~2015-01-16 16:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-16 16:18 Stefan Monnier [this message]
2015-01-16 16:46 ` Constructed docstrings for closures David Kastrup
2015-01-16 16:51 ` Lars Magne Ingebrigtsen
2015-01-16 16:52   ` Lars Magne Ingebrigtsen
2015-01-16 20:54     ` Stefan Monnier
2015-01-16 23:07       ` Artur Malabarba
2015-01-18 12:04 ` Ted Zlatanov
2015-01-18 12:19   ` David Kastrup
2015-01-18 18:15     ` Ted Zlatanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvsifasnzb.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).