bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#68863: Add support for using setf with seq-subseq


From: Okamsn
Subject: bug#68863: Add support for using setf with seq-subseq
Date: Fri, 09 Feb 2024 03:54:32 +0000

Stefan Monnier wrote:
>>> To avoid modifying more values than specified, that modifying function
>>> uses a `when` condition. I'm not sure of a good way to stop `seq-do`
>>> early when we know that it can stop calling the modifying function.
>>> Normally, I would use `cl-block` and `cl-return`. Is it OK to use those
>>> features in `seq.el`? If not, is it worth adding something like a
>>> `seq-map-while` or a `seq-do-while`?
> 
> `seq.el` is used by some parts of the implementation of `cl-lib`, so
> the use of `cl-lib` risks introducing a circular dependency.  Maybe using
> `cl-block/return` would be OK, but I wouldn't be surprised if it causes
> bootstrap trouble.  You can use catch/throw, OTOH.
> 
> 
>          Stefan
> 

Attached is an updated version using `catch` and `throw`. Thank you for 
pointing those out to me. The patch is also changed to signal 
`args-out-of-range` for the start and end indexes to be more like 
`seq-subseq`.

How does it look?

Attachment: v2-0001-Add-setf-support-for-seq-subseq.patch
Description: Text Data


reply via email to

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