aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/tutorial.el
diff options
context:
space:
mode:
authorChong Yidong2006-12-22 15:24:10 +0000
committerChong Yidong2006-12-22 15:24:10 +0000
commit9ccc1a31ee48336e0ee9bd58e52d7a83eafd942d (patch)
tree931d81b44490d9f329e4bddfb4ffb6cdfe84bfe8 /lisp/tutorial.el
parentce9ff7846b179e56f9db08b25e2901898f6542c7 (diff)
downloademacs-9ccc1a31ee48336e0ee9bd58e52d7a83eafd942d.tar.gz
emacs-9ccc1a31ee48336e0ee9bd58e52d7a83eafd942d.zip
(tutorial--save-tutorial): Prompt before saving tutorial state.
Diffstat (limited to 'lisp/tutorial.el')
-rw-r--r--lisp/tutorial.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/tutorial.el b/lisp/tutorial.el
index 1f37687d7e4..be50d793f0f 100644
--- a/lisp/tutorial.el
+++ b/lisp/tutorial.el
@@ -644,9 +644,10 @@ showing changed keys. It also saves the point position and the
644position where the display of changed bindings was inserted." 644position where the display of changed bindings was inserted."
645 ;; This runs in a hook so protect it: 645 ;; This runs in a hook so protect it:
646 (condition-case err 646 (condition-case err
647 (tutorial--save-tutorial-to (tutorial--saved-file)) 647 (if (y-or-n-p "Save your position in the tutorial? ")
648 (error (message "Error saving tutorial state: %s" (error-message-string err)) 648 (tutorial--save-tutorial-to (tutorial--saved-file)))
649 (sit-for 4)))) 649 (error (message "Error saving tutorial state: %s"
650 (error-message-string err)))))
650 651
651(defun tutorial--save-tutorial-to (saved-file) 652(defun tutorial--save-tutorial-to (saved-file)
652 "Save the tutorial buffer to SAVED-FILE. 653 "Save the tutorial buffer to SAVED-FILE.