[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#78149: 31.0.50; find-file not working (cl-remove-if)
From: |
Spencer Baugh |
Subject: |
bug#78149: 31.0.50; find-file not working (cl-remove-if) |
Date: |
Wed, 30 Apr 2025 09:51:45 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Spencer Baugh <sbaugh@janestreet.com>
>> Cc: German Pacenza <germanp82@hotmail.com>, Stefan Monnier
>> <monnier@iro.umontreal.ca>, 78149@debbugs.gnu.org
>> Date: Wed, 30 Apr 2025 09:37:41 -0400
>>
>> > Spencer, please replace cl-remove-if with seq-remove or something else
>> > that is available when minibuffer.el is preloaded by loadup. Calling
>> > cl-seq functions in preloaded files is a no-no, because the
>> > corresponding autoloads are not in loaddefs.el, they are in
>> > cl-loaddefs.el instead, and that file is not loaded until cl-lib is.
>>
>> Ah, I see. Apologies for the breakage. Done in the attached patch.
>
> Thanks. But AFAIU, cl-remove-if is non-destructive, whereas
> seq-remove is destructive. Does that matter in this case?
I think seq-remove is also non-destructive:
(let ((l (list 1 2))) (seq-remove #'numberp l) l)
; => '(1 2)
Looking at the implementation, it works by doing delq on the result of a
cl-map over the list. cl-map makes a copy, so the delq is only
destructive on that copy.