emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New for GNU ELPA: literate-scratch


From: Joost Kremers
Subject: Re: New for GNU ELPA: literate-scratch
Date: Wed, 19 Jun 2024 08:37:42 +0200

On Wed, Jun 19 2024, Philip Kaludercic wrote:
> Sean Whitton <spwhitton@spwhitton.name> 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.

It's documented under if-let, where it says that "[a]n element can
additionally be of the form (VALUEFORM) [...]":

,----
| Each element of SPEC is a list (SYMBOL VALUEFORM) that binds
| SYMBOL to the value of VALUEFORM.  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.  It can also be of the form SYMBOL, then the binding of
| SYMBOL is checked for nil.
`----

The doc string of and-let* points to when-let*, which points to when-let, which
points to if-let. 😄


-- 
Joost Kremers
Life has its moments



reply via email to

[Prev in Thread] Current Thread [Next in Thread]