]> git.eshelyaron.com Git - emacs.git/commitdiff
(uniquify-rationalize-file-buffer-names): Fix corner case when renaming
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 5 Jan 2005 21:49:02 +0000 (21:49 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 5 Jan 2005 21:49:02 +0000 (21:49 +0000)
to the same name.

lisp/ChangeLog
lisp/uniquify.el

index a7f548cf0b045633a0a3338eaab5edc04c247e47..0583c16fcd425b939f2d455d48c8f3c20706a3e3 100644 (file)
@@ -2,6 +2,8 @@
 
        * uniquify.el (uniquify-rationalize-file-buffer-names):
        Re-add an interactive spec.
+       (uniquify-rationalize-file-buffer-names): Fix corner case when renaming
+       to the same name.
 
        * isearch.el (isearch-dehighlight): Remove unused arg `totally'.
        (isearch-update, isearch-done): Adjust calls accordingly.
index 689dffb96189b20d2840fa0fc63fac6f628d1fee..ea9094da78aa2b939a949434b147234a59548ab1 100644 (file)
@@ -194,8 +194,10 @@ this rationalization."
             (uniquify-item-base (car uniquify-managed)) (buffer-name))
         (uniquify-buffer-file-name (current-buffer))
         (current-buffer)))
-  (if (null dirname)
-      (with-current-buffer newbuf (setq uniquify-managed nil))
+  ;; Make sure we don't get confused by outdated uniquify-managed info in
+  ;; this buffer.
+  (with-current-buffer newbuf (setq uniquify-managed nil))
+  (when dirname
     (setq dirname (expand-file-name (directory-file-name dirname)))
     (let ((fix-list (list (uniquify-make-item base dirname newbuf)))
          items)