]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/ibuf-ext.el (ibuffer-remove-alist): Simplify.
authorStefan Kangas <stefan@marxist.se>
Tue, 9 Aug 2022 17:42:07 +0000 (19:42 +0200)
committerStefan Kangas <stefan@marxist.se>
Tue, 9 Aug 2022 19:58:00 +0000 (21:58 +0200)
lisp/ibuf-ext.el

index 44c1ae867d48160a42b2f53bea205ec461dec4e6..6b5cccec5152c7b8f63ff9ccb0f0104e2d69bbf8 100644 (file)
@@ -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"))