diff options
| author | Chong Yidong | 2012-12-01 10:09:45 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-12-01 10:09:45 +0800 |
| commit | 5781e949aef30c56532bed496e69d9f267ec27f8 (patch) | |
| tree | 5b9e5158ab822f554bf268eaf155d176e0bc7650 | |
| parent | f0b6ae635dc3ef36c6692b7ef869e09111291542 (diff) | |
| download | emacs-5781e949aef30c56532bed496e69d9f267ec27f8.tar.gz emacs-5781e949aef30c56532bed496e69d9f267ec27f8.zip | |
Improve the descriptive message in `recover-session'.
* lisp/files.el (recover-session): Improve the descriptive message,
and use substitute-command-keys.
| -rw-r--r-- | lisp/files.el | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lisp/files.el b/lisp/files.el index e03b02193a4..1bb140c0562 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -5417,18 +5417,20 @@ Then you'll be asked about a number of files to recover." | |||
| 5417 | (let ((ls-lisp-support-shell-wildcards t)) | 5417 | (let ((ls-lisp-support-shell-wildcards t)) |
| 5418 | (dired (concat auto-save-list-file-prefix "*") | 5418 | (dired (concat auto-save-list-file-prefix "*") |
| 5419 | (concat dired-listing-switches " -t"))) | 5419 | (concat dired-listing-switches " -t"))) |
| 5420 | (use-local-map (nconc (make-sparse-keymap) (current-local-map))) | ||
| 5421 | (define-key (current-local-map) "\C-c\C-c" 'recover-session-finish) | ||
| 5420 | (save-excursion | 5422 | (save-excursion |
| 5421 | (goto-char (point-min)) | 5423 | (goto-char (point-min)) |
| 5422 | (or (looking-at " Move to the session you want to recover,") | 5424 | (or (looking-at " Move to the session you want to recover,") |
| 5423 | (let ((inhibit-read-only t)) | 5425 | (let ((inhibit-read-only t)) |
| 5424 | ;; Each line starts with a space | 5426 | ;; Each line starts with a space |
| 5425 | ;; so that Font Lock mode won't highlight the first character. | 5427 | ;; so that Font Lock mode won't highlight the first character. |
| 5426 | (insert " Move to the session you want to recover,\n" | 5428 | (insert " To recover a session, move to it and type C-c C-c.\n" |
| 5427 | " then type C-c C-c to select it.\n\n" | 5429 | (substitute-command-keys |
| 5428 | " You can also delete some of these files;\n" | 5430 | " To delete a session file, type \ |
| 5429 | " type d on a line to mark that file for deletion.\n\n")))) | 5431 | \\[dired-flag-file-deletion] on its line to flag |
| 5430 | (use-local-map (nconc (make-sparse-keymap) (current-local-map))) | 5432 | the file for deletion, then \\[dired-do-flagged-delete] to \ |
| 5431 | (define-key (current-local-map) "\C-c\C-c" 'recover-session-finish)) | 5433 | delete flagged files.\n\n")))))) |
| 5432 | 5434 | ||
| 5433 | (defun recover-session-finish () | 5435 | (defun recover-session-finish () |
| 5434 | "Choose one saved session to recover auto-save files from. | 5436 | "Choose one saved session to recover auto-save files from. |