diff options
| author | Chong Yidong | 2006-12-22 15:24:10 +0000 |
|---|---|---|
| committer | Chong Yidong | 2006-12-22 15:24:10 +0000 |
| commit | 9ccc1a31ee48336e0ee9bd58e52d7a83eafd942d (patch) | |
| tree | 931d81b44490d9f329e4bddfb4ffb6cdfe84bfe8 /lisp/tutorial.el | |
| parent | ce9ff7846b179e56f9db08b25e2901898f6542c7 (diff) | |
| download | emacs-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.el | 7 |
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 | |||
| 644 | position where the display of changed bindings was inserted." | 644 | position 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. |