emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 0bc2079ce6 1/5: * lisp/ibuf-ext.el (ibuffer-remove-alist): Simpli


From: Stefan Kangas
Subject: master 0bc2079ce6 1/5: * lisp/ibuf-ext.el (ibuffer-remove-alist): Simplify.
Date: Tue, 9 Aug 2022 15:58:10 -0400 (EDT)

branch: master
commit 0bc2079ce664cfe089a10f8ba0b17f4d2dae9ace
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    * lisp/ibuf-ext.el (ibuffer-remove-alist): Simplify.
---
 lisp/ibuf-ext.el | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index 44c1ae867d..6b5cccec51 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -48,9 +48,7 @@
 ;;; Utility functions
 (defun ibuffer-remove-alist (key alist)
   "Remove all entries in ALIST that have a key equal to KEY."
-  (while (when-let ((it (assoc key alist)))
-           (setq alist (remove it alist)) it))
-  alist)
+  (assoc-delete-all key (copy-sequence alist)))
 
 (defun ibuffer-split-list (fn elts)
   (declare (obsolete seq-group-by "29.1"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]