From: Richard M. Stallman Date: Tue, 24 Oct 1995 22:14:39 +0000 (+0000) Subject: (set-visited-file-name): Abbreviate buffer-file-name. X-Git-Tag: emacs-19.34~2571 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8ccdc29ebc27112908a04969ac59ac41536be3e2;p=emacs.git (set-visited-file-name): Abbreviate buffer-file-name. --- diff --git a/lisp/files.el b/lisp/files.el index 8254b8a456b..a7bfd5ea00a 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1350,8 +1350,6 @@ if you wish to pass an empty string as the argument." (progn (setq truename (file-truename filename)) (if find-file-visit-truename - ;; Do not use the abbreviated filename, because - ;; write-region will reset it to the expanded filename (setq filename truename)))) (or (equal filename buffer-file-name) (progn @@ -1369,8 +1367,12 @@ if you wish to pass an empty string as the argument." (rename-buffer new-name t)))) (setq buffer-backed-up nil) (clear-visited-file-modtime) + ;; Abbreviate the file names of the buffer. (if truename - (setq buffer-file-truename (abbreviate-file-name truename))) + (progn + (setq buffer-file-truename (abbreviate-file-name truename)) + (if find-file-visit-truename + (setq buffer-file-name buffer-file-truename)))) (setq buffer-file-number (if filename (nth 10 (file-attributes buffer-file-name))