projects
/
gnus
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11445f9
)
Define `delete-dups' for XEmacs
author
Lars Ingebrigtsen
<larsi@building.gnus.org>
Sat, 1 Feb 2014 19:59:42 +0000
(11:59 -0800)
committer
Lars Ingebrigtsen
<larsi@building.gnus.org>
Sat, 1 Feb 2014 19:59:42 +0000
(11:59 -0800)
lisp/gnus-compat.el
patch
|
blob
|
history
diff --git
a/lisp/gnus-compat.el
b/lisp/gnus-compat.el
index
ce3ad98
..
deaf2f9
100644
(file)
--- a/
lisp/gnus-compat.el
+++ b/
lisp/gnus-compat.el
@@
-129,6
+129,18
@@
TRASH is ignored."
(forward-line arg))
(beginning-of-line)))
+(unless (fboundp 'delete-dups)
+ (defun delete-dups (list)
+ "Destructively remove `equal' duplicates from LIST.
+Store the result in LIST and return it. LIST must be a proper list.
+Of several `equal' occurrences of an element in LIST, the first
+one is kept."
+ (let ((tail list))
+ (while tail
+ (setcdr tail (delete (car tail) (cdr tail)))
+ (setq tail (cdr tail))))
+ list))
+
(provide 'gnus-compat)
;; gnus-compat.el ends here