comparison lisp/files.el @ 23989:38295026616a

(recover-session): Preserve point when inserting explanation.
author Andreas Schwab <schwab@suse.de>
date Mon, 04 Jan 1999 11:57:27 +0000
parents f81108c27669
children d6ab8dbc44f2
comparison
equal deleted inserted replaced
23988:571d2c4f3edf 23989:38295026616a
2791 (if (null auto-save-list-file-prefix) 2791 (if (null auto-save-list-file-prefix)
2792 (error "You set `auto-save-list-file-prefix' to disable making session files")) 2792 (error "You set `auto-save-list-file-prefix' to disable making session files"))
2793 (let ((ls-lisp-support-shell-wildcards t)) 2793 (let ((ls-lisp-support-shell-wildcards t))
2794 (dired (concat auto-save-list-file-prefix "*") 2794 (dired (concat auto-save-list-file-prefix "*")
2795 (concat dired-listing-switches "t"))) 2795 (concat dired-listing-switches "t")))
2796 (goto-char (point-min)) 2796 (save-excursion
2797 (or (looking-at "Move to the session you want to recover,") 2797 (goto-char (point-min))
2798 (let ((inhibit-read-only t)) 2798 (or (looking-at " Move to the session you want to recover,")
2799 ;; Each line starts with a space 2799 (let ((inhibit-read-only t))
2800 ;; so that Font Lock mode won't highlight the first character. 2800 ;; Each line starts with a space
2801 (insert " Move to the session you want to recover,\n" 2801 ;; so that Font Lock mode won't highlight the first character.
2802 " then type C-c C-c to select it.\n\n" 2802 (insert " Move to the session you want to recover,\n"
2803 " You can also delete some of these files;\n" 2803 " then type C-c C-c to select it.\n\n"
2804 " type d on a line to mark that file for deletion.\n\n"))) 2804 " You can also delete some of these files;\n"
2805 " type d on a line to mark that file for deletion.\n\n"))))
2805 (use-local-map (nconc (make-sparse-keymap) (current-local-map))) 2806 (use-local-map (nconc (make-sparse-keymap) (current-local-map)))
2806 (define-key (current-local-map) "\C-c\C-c" 'recover-session-finish)) 2807 (define-key (current-local-map) "\C-c\C-c" 'recover-session-finish))
2807 2808
2808 (defun recover-session-finish () 2809 (defun recover-session-finish ()
2809 "Choose one saved session to recover auto-save files from. 2810 "Choose one saved session to recover auto-save files from.