diff options
| author | Sam Steingold | 2015-02-23 09:13:31 -0500 |
|---|---|---|
| committer | Sam Steingold | 2015-02-23 09:13:31 -0500 |
| commit | a0edb0160b482bdb9ea48b82e440a3ec5763dd11 (patch) | |
| tree | d1b3b5ead07386fd932f7e59da04897875b1d396 | |
| parent | 931e7babcb81d74709825580192f9ad58d595b63 (diff) | |
| download | emacs-a0edb0160b482bdb9ea48b82e440a3ec5763dd11.tar.gz emacs-a0edb0160b482bdb9ea48b82e440a3ec5763dd11.zip | |
`auto-save-list-file-prefix' can be a directory name
* lisp/files.el (recover-session): Handle `auto-save-list-file-prefix'
being a directory (empty non-directory part).
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/files.el | 9 |
2 files changed, 10 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index af8845bfb45..2c22ed24bb6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2015-02-23 Sam Steingold <sds@gnu.org> | ||
| 2 | |||
| 3 | * files.el (recover-session): Handle `auto-save-list-file-prefix' | ||
| 4 | being a directory (empty non-directory part). | ||
| 5 | |||
| 1 | 2015-02-23 Magnus Henoch <magnus.henoch@gmail.com> | 6 | 2015-02-23 Magnus Henoch <magnus.henoch@gmail.com> |
| 2 | 7 | ||
| 3 | * net/sasl.el (sasl-mechanism-alist): Refer to sasl-scram-rfc | 8 | * net/sasl.el (sasl-mechanism-alist): Refer to sasl-scram-rfc |
diff --git a/lisp/files.el b/lisp/files.el index 1914ad8814c..42b00accbd8 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -5664,13 +5664,14 @@ Then you'll be asked about a number of files to recover." | |||
| 5664 | (interactive) | 5664 | (interactive) |
| 5665 | (if (null auto-save-list-file-prefix) | 5665 | (if (null auto-save-list-file-prefix) |
| 5666 | (error "You set `auto-save-list-file-prefix' to disable making session files")) | 5666 | (error "You set `auto-save-list-file-prefix' to disable making session files")) |
| 5667 | (let ((dir (file-name-directory auto-save-list-file-prefix))) | 5667 | (let ((dir (file-name-directory auto-save-list-file-prefix)) |
| 5668 | (nd (file-name-nondirectory auto-save-list-file-prefix))) | ||
| 5668 | (unless (file-directory-p dir) | 5669 | (unless (file-directory-p dir) |
| 5669 | (make-directory dir t)) | 5670 | (make-directory dir t)) |
| 5670 | (unless (directory-files dir nil | 5671 | (unless (directory-files dir nil |
| 5671 | (concat "\\`" (regexp-quote | 5672 | (if (string= "" nd) |
| 5672 | (file-name-nondirectory | 5673 | directory-files-no-dot-files-regexp |
| 5673 | auto-save-list-file-prefix))) | 5674 | (concat "\\`" (regexp-quote nd))) |
| 5674 | t) | 5675 | t) |
| 5675 | (error "No previous sessions to recover"))) | 5676 | (error "No previous sessions to recover"))) |
| 5676 | (let ((ls-lisp-support-shell-wildcards t)) | 5677 | (let ((ls-lisp-support-shell-wildcards t)) |