diff options
| -rw-r--r-- | lisp/startup.el | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/lisp/startup.el b/lisp/startup.el index a772af71e76..86ded247979 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -228,9 +228,12 @@ This is initialized based on `mail-host-address', | |||
| 228 | after your init file is read, in case it sets `mail-host-address'.") | 228 | after your init file is read, in case it sets `mail-host-address'.") |
| 229 | 229 | ||
| 230 | (defvar auto-save-list-file-prefix "~/.saves-" | 230 | (defvar auto-save-list-file-prefix "~/.saves-" |
| 231 | "Prefix for generating auto-save-list-file-name. | 231 | "Prefix for generating `auto-save-list-file-name'. |
| 232 | Emacs's pid and the system name will be appended to | 232 | This is used after reading your `.emacs' file to initialize |
| 233 | this prefix to create a unique file name.") | 233 | `auto-save-list-file-name', by appending Emacs's pid and the system name, |
| 234 | if you have not already set `auto-save-list-file-name' yourself. | ||
| 235 | Set this to nil if you want to prevent `auto-save-list-file-name' | ||
| 236 | from being initialized.") | ||
| 234 | 237 | ||
| 235 | (defvar init-file-debug nil) | 238 | (defvar init-file-debug nil) |
| 236 | 239 | ||
| @@ -284,12 +287,14 @@ this prefix to create a unique file name.") | |||
| 284 | (setq default-directory (abbreviate-file-name default-directory)) | 287 | (setq default-directory (abbreviate-file-name default-directory)) |
| 285 | ;; Specify the file for recording all the auto save files of this session. | 288 | ;; Specify the file for recording all the auto save files of this session. |
| 286 | ;; This is used by recover-session. | 289 | ;; This is used by recover-session. |
| 287 | (setq auto-save-list-file-name | 290 | (or auto-save-list-file-name |
| 288 | (expand-file-name | 291 | (and auto-save-list-file-prefix |
| 289 | (format "%s%d-%s" | 292 | (setq auto-save-list-file-name |
| 290 | auto-save-list-file-prefix | 293 | (expand-file-name |
| 291 | (emacs-pid) | 294 | (format "%s%d-%s" |
| 292 | (system-name)))) | 295 | auto-save-list-file-prefix |
| 296 | (emacs-pid) | ||
| 297 | (system-name)))))) | ||
| 293 | (run-hooks 'emacs-startup-hook) | 298 | (run-hooks 'emacs-startup-hook) |
| 294 | (and term-setup-hook | 299 | (and term-setup-hook |
| 295 | (run-hooks 'term-setup-hook)) | 300 | (run-hooks 'term-setup-hook)) |
| @@ -658,7 +663,13 @@ Type \\[info] to enter Info, which you can use to read GNU documentation." | |||
| 658 | window-system) | 663 | window-system) |
| 659 | (insert "\n | 664 | (insert "\n |
| 660 | C-mouse-3 (third mouse button, with Control) gets a mode-specific menu.")) | 665 | C-mouse-3 (third mouse button, with Control) gets a mode-specific menu.")) |
| 661 | (if (directory-files "~/" nil "\\`\\.saves-" t) | 666 | (if (directory-files (file-name-directory auto-save-list-file-prefix) |
| 667 | nil | ||
| 668 | (concat "\\`" | ||
| 669 | (regexp-quote | ||
| 670 | (file-name-nondirectory | ||
| 671 | auto-save-list-file-prefix))) | ||
| 672 | t) | ||
| 662 | (insert "\n\nIf an Emacs session crashed recently,\n" | 673 | (insert "\n\nIf an Emacs session crashed recently,\n" |
| 663 | "type M-x recover-session RET to recover" | 674 | "type M-x recover-session RET to recover" |
| 664 | " the files you were editing.")) | 675 | " the files you were editing.")) |