summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2005-01-05 21:49:02 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2005-01-05 21:49:02 +0000
commit9890ec7d19285475a18f191a695eaf4cd90ba6a3 (patch)
tree344bf7485cf173e13ad088b984fe3302b26e2960 /lisp
parent2eec3e8edf086e6a89f81fa1591d9f25b0bc3344 (diff)
downloademacs-9890ec7d19285475a18f191a695eaf4cd90ba6a3.tar.gz
emacs-9890ec7d19285475a18f191a695eaf4cd90ba6a3.tar.bz2
emacs-9890ec7d19285475a18f191a695eaf4cd90ba6a3.zip
(uniquify-rationalize-file-buffer-names): Fix corner case when renaming
to the same name.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/uniquify.el6
2 files changed, 6 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a7f548cf0b0..0583c16fcd4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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.
diff --git a/lisp/uniquify.el b/lisp/uniquify.el
index 689dffb9618..ea9094da78a 100644
--- a/lisp/uniquify.el
+++ b/lisp/uniquify.el
@@ -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)