diff options
| -rw-r--r-- | lisp/files.el | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/lisp/files.el b/lisp/files.el index 42176e264de..bff3e1c65de 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -3688,18 +3688,21 @@ This command is used in the special Dired buffer created by | |||
| 3688 | ;; a "visited file name" from that. | 3688 | ;; a "visited file name" from that. |
| 3689 | (progn | 3689 | (progn |
| 3690 | (forward-line 1) | 3690 | (forward-line 1) |
| 3691 | (setq autofile | 3691 | ;; If there is no auto-save file name, the |
| 3692 | (buffer-substring-no-properties | 3692 | ;; auto-save-list file is probably corrupted. |
| 3693 | (point) | 3693 | (unless (eolp) |
| 3694 | (save-excursion | 3694 | (setq autofile |
| 3695 | (end-of-line) | 3695 | (buffer-substring-no-properties |
| 3696 | (point)))) | 3696 | (point) |
| 3697 | (setq thisfile | 3697 | (save-excursion |
| 3698 | (expand-file-name | 3698 | (end-of-line) |
| 3699 | (substring | 3699 | (point)))) |
| 3700 | (file-name-nondirectory autofile) | 3700 | (setq thisfile |
| 3701 | 1 -1) | 3701 | (expand-file-name |
| 3702 | (file-name-directory autofile))) | 3702 | (substring |
| 3703 | (file-name-nondirectory autofile) | ||
| 3704 | 1 -1) | ||
| 3705 | (file-name-directory autofile)))) | ||
| 3703 | (forward-line 1)) | 3706 | (forward-line 1)) |
| 3704 | ;; This pair of lines is a file-visiting | 3707 | ;; This pair of lines is a file-visiting |
| 3705 | ;; buffer. Use the visited file name. | 3708 | ;; buffer. Use the visited file name. |
| @@ -3713,7 +3716,7 @@ This command is used in the special Dired buffer created by | |||
| 3713 | (point) (progn (end-of-line) (point)))) | 3716 | (point) (progn (end-of-line) (point)))) |
| 3714 | (forward-line 1))) | 3717 | (forward-line 1))) |
| 3715 | ;; Ignore a file if its auto-save file does not exist now. | 3718 | ;; Ignore a file if its auto-save file does not exist now. |
| 3716 | (if (file-exists-p autofile) | 3719 | (if (and autofile (file-exists-p autofile)) |
| 3717 | (setq files (cons thisfile files))))) | 3720 | (setq files (cons thisfile files))))) |
| 3718 | (setq files (nreverse files)) | 3721 | (setq files (nreverse files)) |
| 3719 | ;; The file contains a pair of line for each auto-saved buffer. | 3722 | ;; The file contains a pair of line for each auto-saved buffer. |