[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cl-delete-if vs list of overlays
From: |
Omar Polo |
Subject: |
Re: cl-delete-if vs list of overlays |
Date: |
Wed, 09 Dec 2020 12:05:17 +0100 |
User-agent: |
mu4e 1.4.13; emacs 27.1 |
Thien-Thi Nguyen <ttn@gnuvola.org> writes:
> () Omar Polo <op@omarpolo.com>
> () Wed, 09 Dec 2020 10:53:26 +0100
>
> Why is cl-delete-if not removing items from the list? (setq
> delp t) evaluates to t, so it should delete. cl-delete-if a
> destructive function. This is what I'm not getting.
>
> On my system, ‘C-h f cl-delete-if RET’ sez:
>
> This is a destructive function; it reuses the storage of SEQ
> whenever possible.
>
> So, your question becomes: When is it NOT possible to reuse the
> storage of SEQ in the process of deleting an item?
Oh my, I feel so stupid now...
I was under the (wrong) assumption that a destructive function will
always modify the list, when it's not the case. I needed to setq the
result of cl-delete-if to the list itself to cover all the cases.
Thanks!