summaryrefslogtreecommitdiff
path: root/lisp/subr.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2011-07-08 20:50:01 -0400
committerGlenn Morris <rgm@gnu.org>2011-07-08 20:50:01 -0400
commit7f9b7c53affac3e9fb4e0270e6c71c90cc40b1b2 (patch)
treeeae9b9cb7917f7d3556275a1b867b653ba482a39 /lisp/subr.el
parentaf66a2d72cf94eb8c1d1723cd0101568bad4af82 (diff)
downloademacs-7f9b7c53affac3e9fb4e0270e6c71c90cc40b1b2.tar.gz
* lisp/subr.el (remq): Handle the empty list. (Bug#9024)
Diffstat (limited to 'lisp/subr.el')
-rw-r--r--lisp/subr.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 48158466c6b..5c9d6c8d724 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -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))