2048 |
|
|
2049 |
(defun assq-delete-all (key alist) |
(defun assq-delete-all (key alist) |
2050 |
"Delete from ALIST all elements whose car is KEY. |
"Delete from ALIST all elements whose car is KEY. |
2051 |
Return the modified alist." |
Return the modified alist. |
2052 |
|
Elements of ALIST that are not conses are ignored." |
2053 |
(let ((tail alist)) |
(let ((tail alist)) |
2054 |
(while tail |
(while tail |
2055 |
(if (eq (car (car tail)) key) |
(if (and (consp (car tail)) (eq (car (car tail)) key)) |
2056 |
(setq alist (delq (car tail) alist))) |
(setq alist (delq (car tail) alist))) |
2057 |
(setq tail (cdr tail))) |
(setq tail (cdr tail))) |
2058 |
alist)) |
alist)) |