diff options
| author | Dave Love | 1999-07-30 18:40:22 +0000 |
|---|---|---|
| committer | Dave Love | 1999-07-30 18:40:22 +0000 |
| commit | a62d669550b74be05a643a648595b414388bdaf1 (patch) | |
| tree | cd3e62fff22e50dfd41ca29c0937cfa18b66d23a | |
| parent | 40d34803a76d5a0bb6851ba5e38e35adbcc7789e (diff) | |
| download | emacs-a62d669550b74be05a643a648595b414388bdaf1.tar.gz emacs-a62d669550b74be05a643a648595b414388bdaf1.zip | |
(assoc-delete-all): New function, renamed from frame-delete-all.
| -rw-r--r-- | lisp/subr.el | 11 |
1 files changed, 11 insertions, 0 deletions
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." | |||
| 1252 | ; (setq tail (cdr tail)))) | 1252 | ; (setq tail (cdr tail)))) |
| 1253 | ; alist) | 1253 | ; alist) |
| 1254 | 1254 | ||
| 1255 | (defun assoc-delete-all (key alist) | ||
| 1256 | "Delete from ALIST all elements whose car is KEY. | ||
| 1257 | Return the modified alist." | ||
| 1258 | (setq alist (copy-sequence alist)) | ||
| 1259 | (let ((tail alist)) | ||
| 1260 | (while tail | ||
| 1261 | (if (eq (car (car tail)) key) | ||
| 1262 | (setq alist (delq (car tail) alist))) | ||
| 1263 | (setq tail (cdr tail))) | ||
| 1264 | alist)) | ||
| 1265 | |||
| 1255 | ;;; subr.el ends here | 1266 | ;;; subr.el ends here |