summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2003-06-16 21:24:07 +0000
committerJuanma Barranquero <lekktu@gmail.com>2003-06-16 21:24:07 +0000
commit259be4e69d4c412a8287c9842c214ed85ebd4631 (patch)
tree916bbd727784192c57022f51056dd41c18d92f20
parent9817a6a3ee72823104adacb420ce5052d24da21c (diff)
downloademacs-259be4e69d4c412a8287c9842c214ed85ebd4631.tar.gz
(recover-session-finish): Don't give up when there are two consecutive empty
lines in the auto-save-list file.
-rw-r--r--lisp/files.el29
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
;; a "visited file name" from that.
(progn
(forward-line 1)
- (setq autofile
- (buffer-substring-no-properties
- (point)
- (save-excursion
- (end-of-line)
- (point))))
- (setq thisfile
- (expand-file-name
- (substring
- (file-name-nondirectory autofile)
- 1 -1)
- (file-name-directory autofile)))
+ ;; If there is no auto-save file name, the
+ ;; auto-save-list file is probably corrupted.
+ (unless (eolp)
+ (setq autofile
+ (buffer-substring-no-properties
+ (point)
+ (save-excursion
+ (end-of-line)
+ (point))))
+ (setq thisfile
+ (expand-file-name
+ (substring
+ (file-name-nondirectory autofile)
+ 1 -1)
+ (file-name-directory autofile))))
(forward-line 1))
;; This pair of lines is a file-visiting
;; buffer. Use the visited file name.
@@ -3713,7 +3716,7 @@ This command is used in the special Dired buffer created by
(point) (progn (end-of-line) (point))))
(forward-line 1)))
;; Ignore a file if its auto-save file does not exist now.
- (if (file-exists-p autofile)
+ (if (and autofile (file-exists-p autofile))
(setq files (cons thisfile files)))))
(setq files (nreverse files))
;; The file contains a pair of line for each auto-saved buffer.