diff options
| author | Richard M. Stallman | 1993-04-30 11:54:04 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-04-30 11:54:04 +0000 |
| commit | 1cc2fbeb292d7bced4f9a30fc26489e8816555cf (patch) | |
| tree | 86b2453d03e95f0af01473c578004b347e0beeb9 | |
| parent | caf15d4f18205994732211381bb7331e0a2b71a8 (diff) | |
| download | emacs-1cc2fbeb292d7bced4f9a30fc26489e8816555cf.tar.gz emacs-1cc2fbeb292d7bced4f9a30fc26489e8816555cf.zip | |
(find-file-noselect): Do set buffer-file-name
to the truename, when find-file-visit-truename.
(file-truename): Redo esr's change.
| -rw-r--r-- | lisp/files.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/files.el b/lisp/files.el index b0f92ed0bb5..eb61fff1de1 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -314,7 +314,10 @@ The truename of a file name is found by chasing symbolic links | |||
| 314 | both at the level of the file and at the level of the directories | 314 | both at the level of the file and at the level of the directories |
| 315 | containing it, until no links are left at any level." | 315 | containing it, until no links are left at any level." |
| 316 | (if (string= filename "~") | 316 | (if (string= filename "~") |
| 317 | (setq filename (expand-file-name filename))) | 317 | (progn |
| 318 | (setq filename (expand-file-name filename)) | ||
| 319 | (if (string= filename "") | ||
| 320 | (setq filename "/")))) | ||
| 318 | (let ((handler (find-file-name-handler filename))) | 321 | (let ((handler (find-file-name-handler filename))) |
| 319 | ;; For file name that has a special handler, call handler. | 322 | ;; For file name that has a special handler, call handler. |
| 320 | ;; This is so that ange-ftp can save time by doing a no-op. | 323 | ;; This is so that ange-ftp can save time by doing a no-op. |
| @@ -575,7 +578,8 @@ The buffer is not selected, just returned to the caller." | |||
| 575 | ;; Find the file's truename, and maybe use that as visited name. | 578 | ;; Find the file's truename, and maybe use that as visited name. |
| 576 | (setq buffer-file-truename (abbreviate-file-name truename)) | 579 | (setq buffer-file-truename (abbreviate-file-name truename)) |
| 577 | (setq buffer-file-number number) | 580 | (setq buffer-file-number number) |
| 578 | (if find-file-visit-truename (setq filename buffer-file-truename)) | 581 | (if find-file-visit-truename |
| 582 | (setq buffer-file-name (setq filename buffer-file-truename))) | ||
| 579 | ;; Set buffer's default directory to that of the file. | 583 | ;; Set buffer's default directory to that of the file. |
| 580 | (setq default-directory (file-name-directory filename)) | 584 | (setq default-directory (file-name-directory filename)) |
| 581 | ;; Turn off backup files for certain file names. Since | 585 | ;; Turn off backup files for certain file names. Since |