changeset 74797:90a64762539d

(tutorial--save-tutorial): Prompt before saving tutorial state.
author Chong Yidong <cyd@stupidchicken.com>
date Fri, 22 Dec 2006 15:24:10 +0000
parents 1163009088c6
children 88b3fcab31de
files lisp/tutorial.el
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/tutorial.el	Fri Dec 22 15:24:00 2006 +0000
+++ b/lisp/tutorial.el	Fri Dec 22 15:24:10 2006 +0000
@@ -644,9 +644,10 @@
 position where the display of changed bindings was inserted."
   ;; This runs in a hook so protect it:
   (condition-case err
-      (tutorial--save-tutorial-to (tutorial--saved-file))
-    (error (message "Error saving tutorial state: %s" (error-message-string err))
-           (sit-for 4))))
+      (if (y-or-n-p "Save your position in the tutorial? ")
+	  (tutorial--save-tutorial-to (tutorial--saved-file)))
+    (error (message "Error saving tutorial state: %s"
+		    (error-message-string err)))))
 
 (defun tutorial--save-tutorial-to (saved-file)
   "Save the tutorial buffer to SAVED-FILE.