From: Stefan Monnier Date: Tue, 29 Apr 2008 07:11:36 +0000 (+0000) Subject: (uniquify-rationalize-a-list): Beware of side-effects. X-Git-Tag: emacs-pretest-23.0.90~5949 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3e9db557b8e323d51b8d3080c9d2b04ab93f7af3;p=emacs.git (uniquify-rationalize-a-list): Beware of side-effects. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2374dbc783d..9679a52dcb1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2008-04-29 Stefan Monnier + + * uniquify.el (uniquify-rationalize-a-list): Beware of side-effects. + 2008-04-29 Daiki Ueno * epa.el (epa-key-list-mode-map): Add menu. diff --git a/lisp/uniquify.el b/lisp/uniquify.el index fc03ec41c91..03e54b55ee4 100644 --- a/lisp/uniquify.el +++ b/lisp/uniquify.el @@ -329,7 +329,7 @@ in `uniquify-list-buffers-directory-modes', otherwise returns nil." proposed) ;; Divide fix-list into items with same proposed names and pass them ;; to uniquify-rationalize-conflicting-sublist. - (dolist (item (sort fix-list 'uniquify-item-greaterp)) + (dolist (item (sort (copy-sequence fix-list) 'uniquify-item-greaterp)) (setq proposed (uniquify-item-proposed item)) (unless (equal proposed old-proposed) (uniquify-rationalize-conflicting-sublist conflicting-sublist