changeset 38218:ab6119af2d6b

(uniquify-rationalize-file-buffer-names): Do a preliminary quick reordering. Can speed things up dramatically.
author Francesco Potortì <pot@gnu.org>
date Wed, 27 Jun 2001 15:56:51 +0000
parents e2c37bd6d337
children f70ea2b09e46
files lisp/uniquify.el
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/uniquify.el	Wed Jun 27 15:56:21 2001 +0000
+++ b/lisp/uniquify.el	Wed Jun 27 15:56:51 2001 +0000
@@ -223,8 +223,9 @@
 	(setq buffers (cdr buffers))))
     ;; selects buffers whose names may need changing, and others that
     ;; may conflict.
-    (setq fix-list
-	  (sort fix-list 'uniquify-fix-item-filename-lessp))
+    (setq fix-list (sort
+		    (sort fix-list 'string-lessp) ;do a quick pre-ordering
+		    'uniquify-fix-item-filename-lessp))
     ;; bringing conflicting names together
     (uniquify-rationalize-a-list fix-list uniquify-min-dir-content)
     (mapcar 'uniquify-fix-item-unrationalized-buffer fix-list)))