unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
To: emacs-devel@gnu.org
Subject: Re: Constructed docstrings for closures
Date: Sun, 18 Jan 2015 13:19:25 +0100	[thread overview]
Message-ID: <8761c4b7si.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <87mw5g2t3g.fsf@lifelogs.com> (Ted Zlatanov's message of "Sun, 18 Jan 2015 07:04:03 -0500")

Ted Zlatanov <tzz@lifelogs.com> writes:

> On Fri, 16 Jan 2015 11:18:26 -0500 Stefan Monnier
> <monnier@IRO.UMontreal.CA> wrote:
>
> SM> I'd like to lift this restriction by offering a new feature that lets us
> SM> do something like:
>
> SM>    (lambda (foo bar)
> SM>      <something-magical-here>
> SM>      (code using foo and bar (and blabla as well)))
>
> SM> and get the closure we want with the docstring we want.
>
> SM> Does anyone have an idea of what the <something-magical-here>
> SM> could/should be?
>
> Would it be crazy to make it look like a `defun' docstring?
>
>     (lambda (foo bar)
>       "My docstring about FOO and BAR"
>       (code using foo and bar (and blabla as well)))

Uh, that one has worked for decades already.  The point was that the
docstring was to be _computed_ from a variable in the enclosing scope.

-- 
David Kastrup



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

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-16 16:18 Constructed docstrings for closures Stefan Monnier
2015-01-16 16:46 ` 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 [this message]
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=8761c4b7si.fsf@fencepost.gnu.org \
    --to=dak@gnu.org \
    --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).