[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#29489: Obsolete gnus-remove-if and gnus-remove-if-not
From: |
Eric Abrahamsen |
Subject: |
bug#29489: Obsolete gnus-remove-if and gnus-remove-if-not |
Date: |
Thu, 30 Nov 2017 10:29:44 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> Noam Postavsky <npostavs@users.sourceforge.net> writes:
>
>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>
>>> For the interim, all that matters is consistency:
>>>
>>> (let ((list nil)
>>> (ob (make-vector 3 0)))
>>> (intern "foo" ob)
>>> (intern "bar" ob)
>>> (intern "xxx" ob)
>>> (gnus-remove-if-not (lambda (_) t) ob)) ;=> (xxx 0 0)
>>
>> But:
>>
>> (let ((list nil)
>> (ob (make-vector 3 0)))
>> (intern "foo" ob)
>> (intern "bar" ob)
>> (intern "xxx" ob)
>> (gnus-remove-if-not (lambda (_) t)
>> ob t)) ;=> (xxx bar foo)
>
> Good catch! Thanks for that. I was too hasty, and had already moved on
> to running the next patch.
>
> There are only two places in the code where that third argument is
> passed. I can rework those two locations so that they work properly,
> until the next step is taken.
For a brief, amusing moment, I thought I could write a seq-filter method
that specialized on obarrays, but unfortunately there's no specializer
for obarrays. Oh well. Here's another version of the patch. It's not
pretty, but I do hope it's temporary.
0001-Obsolete-gnus-remove-if-and-gnus-remove-if-not.patch
Description: Text Data
- bug#29489: Obsolete gnus-remove-if and gnus-remove-if-not,
Eric Abrahamsen <=