projects/guix·blob python-team · refs

31 lines · 1.2 KiB

1From 631df3f68c79cca2a26bc8ea1a98a332ef53751e Mon Sep 17 00:00:00 2001
2Message-ID: <631df3f68c79cca2a26bc8ea1a98a332ef53751e.1790072851.git.csantosb@disroot.org>
3From: "Basil L. Contovounesios" <[email protected]>
4Date: Mon, 9 Mar 2026 22:02:11 +0100
5Subject: [PATCH] Avoid nil predicate with cl-remove-if-not
6
7Emacs 31 no longer silently accepts a nil predicate.
8
9* ivy.el (ivy--reset-state): Skip alist filtering in the absence of
10a predicate.
11---
12 ivy.el | 3 ++-
13 1 file changed, 2 insertions(+), 1 deletion(-)
14
15diff --git a/ivy.el b/ivy.el
16index a6aca7a..9d5f805 100644
17--- a/ivy.el
18+++ b/ivy.el
19@@ -2497,7 +2497,8 @@ This is useful for recursive `ivy-read'."
20 ivy--all-candidates
21 (ivy--dynamic-collection-cands (or initial-input "")))))
22 ((consp (car-safe collection))
23- (setq collection (cl-remove-if-not predicate collection))
24+ (when predicate
25+ (setq collection (cl-remove-if-not predicate collection)))
26 (when (and sort (setq sort-fn (ivy--sort-function caller)))
27 (setq collection (sort (copy-sequence collection) sort-fn))
28 (setq sort nil))
29--
302.54.0
31