[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#29489: Obsolete gnus-remove-if and gnus-remove-if-not
From: |
Noam Postavsky |
Subject: |
bug#29489: Obsolete gnus-remove-if and gnus-remove-if-not |
Date: |
Tue, 28 Nov 2017 18:44:05 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) |
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> Here's another one of these.
>
> I've replaced these with `seq-remove' and `seq-filter', and I suppose
> someone might object to that -- the other option would be `cl-remove-if'
> and `cl-remove-if-not'. I don't believe there's much practical difference.
Neither the seq nor cl functions handle hash tables right?
> - (gnus-remove-if-not 'gnus-valid-move-group-p gnus-active-hashtb
> t)
> + (seq-filter 'gnus-valid-move-group-p gnus-active-hashtb)
> nil prefix nil default))
> ((= 1 (length split-name))
> (gnus-group-completing-read
> prom
> - (gnus-remove-if-not 'gnus-valid-move-group-p gnus-active-hashtb t)
> + (seq-filter 'gnus-valid-move-group-p gnus-active-hashtb)
> nil prefix 'gnus-group-history (car split-name)))
> -(defun gnus-remove-if (predicate sequence &optional hash-table-p)
> - "Return a copy of SEQUENCE with all items satisfying PREDICATE removed.
> -SEQUENCE should be a list, a vector, or a string. Returns always a list.
> -If HASH-TABLE-P is non-nil, regards SEQUENCE as a hash table."
Although the docstring claims "hash table", while the code says...
> - (if hash-table-p
> - (mapatoms (lambda (symbol)
> - (unless (funcall predicate symbol)
> - (push symbol out)))
> - sequence)
obarray?