|
From: | Lute Kamstra |
Subject: | Re: Adding rassq-delete-all to lisp/subr.el. |
Date: | Tue, 19 Apr 2005 16:06:55 +0200 |
User-agent: | Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Lute Kamstra <address@hidden> writes: > (defun rassq-delete-all (value alist) > "Delete from ALIST all elements whose cdr is `eq' to VALUE. > Return the modified alist. > Elements of ALIST that are not conses are ignored." > (let ((tail alist)) > (while tail > (when (and (consp (car tail)) (eq (cadr tail) value)) ^^^^ Whoops: cdar > (setq alist (delq (car tail) alist))) > (setq tail (cdr tail))) > alist))
[Prev in Thread] | Current Thread | [Next in Thread] |