Mercurial > emacs
changeset 59381:77618102ddc4
(uniquify-rationalize-file-buffer-names): Fix corner case when renaming
to the same name.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 05 Jan 2005 21:49:02 +0000 |
parents | 7764df4e45e1 |
children | e25d041a3a6e |
files | lisp/ChangeLog lisp/uniquify.el |
diffstat | 2 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Wed Jan 05 21:20:38 2005 +0000 +++ b/lisp/ChangeLog Wed Jan 05 21:49:02 2005 +0000 @@ -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.
--- a/lisp/uniquify.el Wed Jan 05 21:20:38 2005 +0000 +++ b/lisp/uniquify.el Wed Jan 05 21:49:02 2005 +0000 @@ -194,8 +194,10 @@ (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)