emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master f201bf6: * lisp/subr.el (delete-dups): Make it dest


From: Artur Malabarba
Subject: [Emacs-diffs] master f201bf6: * lisp/subr.el (delete-dups): Make it destructive again.
Date: Wed, 06 May 2015 18:29:28 +0000

branch: master
commit f201bf6a5050d575dfc759fa23955fab0fbcfcb9
Author: Artur Malabarba <address@hidden>
Commit: Artur Malabarba <address@hidden>

    * lisp/subr.el (delete-dups): Make it destructive again.
---
 lisp/subr.el |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/subr.el b/lisp/subr.el
index 591980d..a32fb96 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -424,12 +424,12 @@ one is kept."
           (unless (gethash elt hash)
             (puthash elt elt hash)
             (push elt res)))
-        (nreverse res))
+        (setcdr list (cdr (nreverse res))))
     (let ((tail list))
       (while tail
         (setcdr tail (delete (car tail) (cdr tail)))
-        (setq tail (cdr tail))))
-    list))
+        (setq tail (cdr tail)))))
+  list)
 
 ;; See http://lists.gnu.org/archive/html/emacs-devel/2013-05/msg00204.html
 (defun delete-consecutive-dups (list &optional circular)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]