From a62d669550b74be05a643a648595b414388bdaf1 Mon Sep 17 00:00:00 2001 From: Dave Love Date: Fri, 30 Jul 1999 18:40:22 +0000 Subject: [PATCH] (assoc-delete-all): New function, renamed from frame-delete-all. --- lisp/subr.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lisp/subr.el b/lisp/subr.el index 1abfb4797f5..04b840e882f 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1252,4 +1252,15 @@ configuration." ; (setq tail (cdr tail)))) ; alist) +(defun assoc-delete-all (key alist) + "Delete from ALIST all elements whose car is KEY. +Return the modified alist." + (setq alist (copy-sequence alist)) + (let ((tail alist)) + (while tail + (if (eq (car (car tail)) key) + (setq alist (delq (car tail) alist))) + (setq tail (cdr tail))) + alist)) + ;;; subr.el ends here -- 2.39.5