]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/subr.el (remq): Handle the empty list. (Bug#9024)
authorGlenn Morris <rgm@gnu.org>
Sat, 9 Jul 2011 00:50:01 +0000 (20:50 -0400)
committerGlenn Morris <rgm@gnu.org>
Sat, 9 Jul 2011 00:50:01 +0000 (20:50 -0400)
lisp/ChangeLog
lisp/subr.el

index 729013ba54ce52feca93882fbd2f2a20029752df..81ce153600ce26b0679ae4ddd5247ff577e93ac7 100644 (file)
@@ -1,3 +1,7 @@
+2011-07-09  Glenn Morris  <rgm@gnu.org>
+
+       * subr.el (remq): Handle the empty list.  (Bug#9024)
+
 2011-07-08  Andreas Schwab  <schwab@linux-m68k.org>
 
        * mail/sendmail.el (send-mail-function): No longer delay custom
index 48158466c6b69dc07237ddde622ab7e7bc5eb41f..5c9d6c8d7249e0f5f88908e4d6c76a73bc29bb6e 100644 (file)
@@ -490,7 +490,7 @@ SEQ must be a list, vector, or string.  The comparison is done with `equal'."
   "Return LIST with all occurrences of ELT removed.
 The comparison is done with `eq'.  Contrary to `delq', this does not use
 side-effects, and the argument LIST is not modified."
-  (while (eq elt (car list)) (setq list (cdr list)))
+  (while (and (eq elt (car list)) (setq list (cdr list))))
   (if (memq elt list)
       (delq elt (copy-sequence list))
     list))