# HG changeset patch # User Richard M. Stallman # Date 1051226052 0 # Node ID fc93ef4196d19c4b11d68e584626c29c4a2e3574 # Parent 17c60796aa6a6d2ee17bd7b6400faced6706d323 (assq-delete-all): Ignore non-cons elememts. diff -r 17c60796aa6a -r fc93ef4196d1 lisp/subr.el --- a/lisp/subr.el Thu Apr 24 16:16:56 2003 +0000 +++ b/lisp/subr.el Thu Apr 24 23:14:12 2003 +0000 @@ -2048,10 +2048,11 @@ (defun assq-delete-all (key alist) "Delete from ALIST all elements whose car is KEY. -Return the modified alist." +Return the modified alist. +Elements of ALIST that are not conses are ignored." (let ((tail alist)) (while tail - (if (eq (car (car tail)) key) + (if (and (consp (car tail)) (eq (car (car tail)) key)) (setq alist (delq (car tail) alist))) (setq tail (cdr tail))) alist))