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: Philip Kaludercic
Subject: Re: New for GNU ELPA: literate-scratch
Date: Fri, 21 Jun 2024 05:57:11 +0000

Michael Heerdegen <michael_heerdegen@web.de> writes:

> 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:

As I believe I had mentioned in another message, the issue was on my end
that some package had overwritten the definition of `if-let', thereby
not only removing the documentation but this functionality as well.

> | 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.

-- 
        Philip Kaludercic on peregrine



reply via email to

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