]> code.delx.au - gnu-emacs/blobdiff - lisp/subr.el
Fix incorrect args to display-buffer-reuse-window in 2011-07-09T12:32:38Z!rudalics...
[gnu-emacs] / lisp / subr.el
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))