diff options
| author | Glenn Morris | 2011-07-08 20:50:01 -0400 |
|---|---|---|
| committer | Glenn Morris | 2011-07-08 20:50:01 -0400 |
| commit | 7f9b7c53affac3e9fb4e0270e6c71c90cc40b1b2 (patch) | |
| tree | eae9b9cb7917f7d3556275a1b867b653ba482a39 | |
| parent | af66a2d72cf94eb8c1d1723cd0101568bad4af82 (diff) | |
| download | emacs-7f9b7c53affac3e9fb4e0270e6c71c90cc40b1b2.tar.gz emacs-7f9b7c53affac3e9fb4e0270e6c71c90cc40b1b2.zip | |
* lisp/subr.el (remq): Handle the empty list. (Bug#9024)
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/subr.el | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 729013ba54c..81ce153600c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-07-09 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * subr.el (remq): Handle the empty list. (Bug#9024) | ||
| 4 | |||
| 1 | 2011-07-08 Andreas Schwab <schwab@linux-m68k.org> | 5 | 2011-07-08 Andreas Schwab <schwab@linux-m68k.org> |
| 2 | 6 | ||
| 3 | * mail/sendmail.el (send-mail-function): No longer delay custom | 7 | * mail/sendmail.el (send-mail-function): No longer delay custom |
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'." | |||
| 490 | "Return LIST with all occurrences of ELT removed. | 490 | "Return LIST with all occurrences of ELT removed. |
| 491 | The comparison is done with `eq'. Contrary to `delq', this does not use | 491 | The comparison is done with `eq'. Contrary to `delq', this does not use |
| 492 | side-effects, and the argument LIST is not modified." | 492 | side-effects, and the argument LIST is not modified." |
| 493 | (while (eq elt (car list)) (setq list (cdr list))) | 493 | (while (and (eq elt (car list)) (setq list (cdr list)))) |
| 494 | (if (memq elt list) | 494 | (if (memq elt list) |
| 495 | (delq elt (copy-sequence list)) | 495 | (delq elt (copy-sequence list)) |
| 496 | list)) | 496 | list)) |