all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: Tino Calancha <tino.calancha@gmail.com>
Cc: 32803@debbugs.gnu.org
Subject: bug#32803: 26.1.50; cl-do: Add more literature in docstring
Date: Mon, 24 Sep 2018 09:43:49 -0700	[thread overview]
Message-ID: <87va6un8vu.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87pnx36vy2.fsf@calancha-pc.dy.bbexcite.jp> (Tino Calancha's message of "Mon, 24 Sep 2018 19:17:41 +0900")

Tino Calancha <tino.calancha@gmail.com> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> Cc: eli zaretskii <eliz@gnu.org>
>>> From: Tino Calancha <tino.calancha@gmail.com>
>>> Date: Sun, 23 Sep 2018 00:02:50 +0900
>>> 
>>> Well, the subject say everything... the docstring of cl-do/cl-do*
>>> resembles one of my phone calls :-(
>>> 
>>> Considering their names (do), it might be useful talk a bit about
>>> what the macros do :-)
>>> There is also room to say something on their arguments.
>>
>> Thanks.  My suggestion is to copy the description from the first
>> paragraph of what the CL manual says.
> It's very precise.  Thank you.
> I just added that the whole loop is wrapped inside a `nil' block.
>> I leave it to you to decide whether a link to the Info manual is
>> needed, after these changes.
> It's worth to keep it so that users can take a look on the
> provided examples.
>
> I will push the following in a couple of days in case no more
> activity in this thread:
>
> commit 805adebd1ff999358e016dff8d60751aba657262
> Author: Tino Calancha <tino.calancha@gmail.com>
> Date:   Mon Sep 24 19:09:29 2018 +0900
>
>     * lisp/emacs-lisp/cl-macs.el(cl-do, cl-do*): Update docstring
>
> diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
> index 0854e665b9..10bc611325 100644
> --- a/lisp/emacs-lisp/cl-macs.el
> +++ b/lisp/emacs-lisp/cl-macs.el
> @@ -1745,7 +1745,21 @@ cl--loop-build-ands
>  
>  ;;;###autoload
>  (defmacro cl-do (steps endtest &rest body)
> -  "The Common Lisp `do' loop.
> +  "Bind variables and run BODY forms until END-TEST returns non-nil.
> +First, each VAR is bound to the associated INIT value as if by a `let' form.
> +Then, in each iteration of the loop, the END-TEST is evaluated; if true,
         ^^^^^^^

From the peanut gallery: Without looking at the code, I'm not sure if
this means the test is evaluated *before* BODY (ie, BODY may never run),
or *after* BODY (ie, BODY always runs at least once). Could that "in" be
changed to either "before" or "after"?





  reply	other threads:[~2018-09-24 16:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-22 15:02 bug#32803: 26.1.50; cl-do: Add more literature in docstring Tino Calancha
2018-09-24  9:13 ` Eli Zaretskii
2018-09-24 10:17   ` Tino Calancha
2018-09-24 16:43     ` Eric Abrahamsen [this message]
2018-09-24 16:58       ` Eli Zaretskii
2018-09-24 17:53         ` Eric Abrahamsen
2018-09-24 20:43           ` Tino Calancha
2018-09-27  4:08             ` Eric Abrahamsen
2018-09-28 20:13               ` Tino Calancha
2018-09-28 21:00                 ` Eric Abrahamsen
2018-09-29  9:10                   ` Tino Calancha

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

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

  git send-email \
    --in-reply-to=87va6un8vu.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=32803@debbugs.gnu.org \
    --cc=tino.calancha@gmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.