changeset 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 571d2c4f3edf
children 5889365d18cd
files lisp/files.el
diffstat 1 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Mon Jan 04 11:53:22 1999 +0000
+++ b/lisp/files.el	Mon Jan 04 11:57:27 1999 +0000
@@ -2793,15 +2793,16 @@
   (let ((ls-lisp-support-shell-wildcards t))
     (dired (concat auto-save-list-file-prefix "*")
 	   (concat dired-listing-switches "t")))
-  (goto-char (point-min))
-  (or (looking-at "Move to the session you want to recover,")
-      (let ((inhibit-read-only t))
-	;; Each line starts with a space
-	;; so that Font Lock mode won't highlight the first character.
-	(insert " Move to the session you want to recover,\n"
-		" then type C-c C-c to select it.\n\n"
-		" You can also delete some of these files;\n"
-		" type d on a line to mark that file for deletion.\n\n")))
+  (save-excursion
+    (goto-char (point-min))
+    (or (looking-at " Move to the session you want to recover,")
+	(let ((inhibit-read-only t))
+	  ;; Each line starts with a space
+	  ;; so that Font Lock mode won't highlight the first character.
+	  (insert " Move to the session you want to recover,\n"
+		  " then type C-c C-c to select it.\n\n"
+		  " You can also delete some of these files;\n"
+		  " type d on a line to mark that file for deletion.\n\n"))))
   (use-local-map (nconc (make-sparse-keymap) (current-local-map)))
   (define-key (current-local-map) "\C-c\C-c" 'recover-session-finish))