From: Dave Love Date: Fri, 30 Jul 1999 18:40:22 +0000 (+0000) Subject: (assoc-delete-all): New function, renamed from frame-delete-all. X-Git-Tag: emacs-pretest-21.0.90~7301 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a62d669550b74be05a643a648595b414388bdaf1;p=emacs.git (assoc-delete-all): New function, renamed from frame-delete-all. --- 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