diff options
| -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 |