Mercurial > emacs
changeset 51591:0c99783aa385
(recover-session-finish): Don't give up when there are two consecutive empty
lines in the auto-save-list file.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Mon, 16 Jun 2003 21:24:07 +0000 |
parents | f13922c0480e |
children | 658ac87cca4e |
files | lisp/files.el |
diffstat | 1 files changed, 16 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/files.el Mon Jun 16 20:30:31 2003 +0000 +++ b/lisp/files.el Mon Jun 16 21:24:07 2003 +0000 @@ -3688,18 +3688,21 @@ ;; 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 @@ (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.