]> git.eshelyaron.com Git - emacs.git/commitdiff
(assoc-delete-all): New function, renamed from frame-delete-all.
authorDave Love <fx@gnu.org>
Fri, 30 Jul 1999 18:40:22 +0000 (18:40 +0000)
committerDave Love <fx@gnu.org>
Fri, 30 Jul 1999 18:40:22 +0000 (18:40 +0000)
lisp/subr.el

index 1abfb4797f544396ab4fe39aa64b073893d228ba..04b840e882fc0c14b7f78a6260d3ead533fb894c 100644 (file)
@@ -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