Subject: bug#72344: [PATCH] Add a version of cl-once-only which handles lists of forms

From: Thuna <[email-masked]>
Date: Tue, 06 Aug 2024 14:28:30 +0200

> Looks good.  I wonder if it might be easier to read if you could somehow
> extend the example I used for cl-once-only ?

I'll look into it, though the whole thing really needs a do-over, and I
am not sure if I am the right person for that.  I'll whip up another
draft in a day or so and we can see how that looks.

>> (Do we want a NEWS entry also?)
>
> Yes, probably appropriate.

What about something like this?

  +++
  *** New macro `cl-once-only*'.
  This macro is a version of `cl-once-only' which takes a list of forms.
  This can be used when there are an arbitrary number of arguments which
  need to be evaluated exactly once.

Also, I put it under "Lisp Changes in Emacs" but is that right?

>>> cl-seq-once-only ?
>>
>> How about `cl-once-only-multiple'?  The name should probably be of the
>> form `cl-once-only<something>', rather than `cl-<something>-once-only' I
>> think.
>
> There are already several cl-multiple-... so maybe cl-once-only-mult ?
> cl-once-only-multiple is fine with me, though.
>
> cl-once-only-rest, as a reference to &rest ?

If `cl-once-only-multiple' is fine by you then I would prefer that over
`cl-once-only-rest' and `cl-once-only-mult'.  It would help to get more
suggestions, but I don't think anyone else will be chiming in at this
point.