unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Philip Kaludercic <philipk@posteo.net>
Cc: Sean Whitton <spwhitton@spwhitton.name>,
	 Sean Whitton via "Emacs development discussions."
	<emacs-devel@gnu.org>
Subject: Re: New for GNU ELPA: literate-scratch
Date: Fri, 21 Jun 2024 01:12:45 +0200	[thread overview]
Message-ID: <87plsbdx8y.fsf@web.de> (raw)
In-Reply-To: <87le31a3lj.fsf@posteo.net> (Philip Kaludercic's message of "Wed,  19 Jun 2024 05:44:40 +0000")

Philip Kaludercic <philipk@posteo.net> writes:

> >> You should be able to merge the `and-let*' and `and' like
> >>
> >> --8<---------------cut here---------------start------------->8---
> >> (and-let* ((new (car (bounds-of-thing-at-point 'paragraph)))
> >> 	   ((< new start)))
> >>   (setq start new))
> >> --8<---------------cut here---------------end--------------->8---
> >
> > Very interesting!
> > This seems to be undocumented behaviour of the macro, though?
> > I don't think I can see anything which implies it in the docstring.
>
> Apparently so?  I thought it was documented under if-let* or when-let*,
> but I couldn't find anything myself either.  BTW., an alternative is to
> bind the symbol `_', which will also discard the value/bind it to a
> fresh variable.

The whole documentation is not replicated completely in each doc string
- the complete documentation is that of `if-let', and it has this
sentence:

| An element can additionally be of the form (VALUEFORM), which is
| evaluated and checked for nil; i.e. SYMBOL can be omitted if only the
| test result is of interest.

which is what you speak about IIUC.  Unless I'm mistaken, this syntax
has been supported by all variants for a long time.

The `_' rewrite is also possible but raises compiler warnings.  We
have fixed this only recently in master.


Michael.



  parent reply	other threads:[~2024-06-20 23:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-09  5:53 New for GNU ELPA: literate-scratch Sean Whitton via Emacs development discussions.
2024-06-10  6:16 ` CToID
2024-06-15 14:14   ` Philip Kaludercic
2024-06-15 13:12 ` Philip Kaludercic
2024-06-19  2:42   ` Sean Whitton via Emacs development discussions.
2024-06-19  5:44     ` Philip Kaludercic
2024-06-19  6:37       ` Joost Kremers
2024-06-19  6:47         ` Philip Kaludercic
2024-06-20  5:37       ` Sean Whitton via Emacs development discussions.
2024-06-20 23:12       ` Michael Heerdegen [this message]
2024-06-21  5:57         ` 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=87plsbdx8y.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=emacs-devel@gnu.org \
    --cc=philipk@posteo.net \
    --cc=spwhitton@spwhitton.name \
    /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).