From 9ccc1a31ee48336e0ee9bd58e52d7a83eafd942d Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 22 Dec 2006 15:24:10 +0000 Subject: [PATCH] (tutorial--save-tutorial): Prompt before saving tutorial state. --- lisp/tutorial.el | 7 ++++--- 1 file 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 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. -- 2.39.2