unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Adam Porter <adam@alphapapa.net>
To: Drew Adams <drew.adams@oracle.com>,
	Philip Kaludercic <philipk@posteo.net>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: [External] : Re: [ELPA] New package: listen
Date: Mon, 26 Feb 2024 12:07:12 -0600	[thread overview]
Message-ID: <a3a48b29-d883-4649-b2fa-974a80d4a528@alphapapa.net> (raw)
In-Reply-To: <SJ0PR10MB5488533BC7D6EB44EB716B95F35A2@SJ0PR10MB5488.namprd10.prod.outlook.com>

On 2/26/24 11:17, Drew Adams wrote:

> There's no separation of return value from
> conditions in `when' - it simply always
> returns `nil'.  It has only one condition,
> the body has no bearing on the return value
> (unless it `throw's etc.).
> 
> The visual separation of condition code and
> body is irrelevant to the logical separation
> of condition and return value.  The body's
> irrelevant to the return value.

According to elisp.info:

> when is a Lisp macro in ‘subr.el’.
> 
> (when COND &rest BODY)
> 
> If COND yields non-nil, do BODY, else return nil.
> When COND yields non-nil, eval BODY forms sequentially and return
> value of last one, or nil if there are none.

According to CLHS:

> In a when form, if the test-form yields true, the forms are evaluated in order from left to right and the values returned by the forms are returned from the when form. Otherwise, if the test-form yields false, the forms are not evaluated, and the when form returns nil. 




  parent reply	other threads:[~2024-02-26 18:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-25  7:28 [ELPA] New package: listen Adam Porter
2024-02-25 11:43 ` Philip Kaludercic
2024-02-25 13:14   ` Adam Porter
2024-02-25 13:45     ` Philip Kaludercic
2024-02-26  4:15       ` Adam Porter
2024-02-26  8:09         ` Philip Kaludercic
2024-02-26  8:50           ` Adam Porter
2024-02-26 10:13             ` Philip Kaludercic
2024-02-26 14:51               ` Adam Porter
2024-02-26 15:26                 ` Philip Kaludercic
2024-02-26 15:45                   ` Adam Porter
2024-02-26 17:17         ` [External] : " Drew Adams
2024-02-26 17:21           ` Philip Kaludercic
2024-02-26 17:43             ` Drew Adams
2024-02-26 18:07           ` Adam Porter [this message]
2024-02-26 21:18             ` Drew Adams
2024-02-26 22:14               ` Stephen Berman
2024-02-25 14:17     ` Andreas Schwab
2024-02-26  3:46       ` Adam Porter
2024-02-26  7:47         ` Philip Kaludercic

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=a3a48b29-d883-4649-b2fa-974a80d4a528@alphapapa.net \
    --to=adam@alphapapa.net \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=philipk@posteo.net \
    /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).