diff options
| author | Manuel Giraud | 2024-11-29 16:35:47 +0100 |
|---|---|---|
| committer | Eli Zaretskii | 2024-11-30 17:36:53 +0200 |
| commit | a8169bee2064282a40214ef65ef0493233ed4669 (patch) | |
| tree | 4e8ccda592269afd0195c7ae628e2f8d772c9d70 /lisp/tutorial.el | |
| parent | d06a0153ced177ab41e578baac4b26667f337b58 (diff) | |
| download | emacs-a8169bee2064282a40214ef65ef0493233ed4669.tar.gz emacs-a8169bee2064282a40214ef65ef0493233ed4669.zip | |
Fix exiting Emacs after saving a tutorial
* lisp/tutorial.el (tutorial--lang)
(tutorial--point-before-chkeys): Add both variables as
permanent-local, so that saving the tutorial to some file
doesn't kill these buffer-local variables. Otherwise, trying to
exit Emacs after saving the tutorial will signal an error,
because 'tutorial--lang' is nil. (Bug#74364)
Diffstat (limited to 'lisp/tutorial.el')
| -rw-r--r-- | lisp/tutorial.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/tutorial.el b/lisp/tutorial.el index d754db238de..86537d995fe 100644 --- a/lisp/tutorial.el +++ b/lisp/tutorial.el | |||
| @@ -650,7 +650,12 @@ with some explanatory links." | |||
| 650 | (delete-region prop-start prop-end)))))) | 650 | (delete-region prop-start prop-end)))))) |
| 651 | 651 | ||
| 652 | (defvar tutorial--starting-point) | 652 | (defvar tutorial--starting-point) |
| 653 | |||
| 654 | ;; For when the user saves the TUTORIAL to a file. | ||
| 653 | (put 'tutorial--starting-point 'permanent-local t) | 655 | (put 'tutorial--starting-point 'permanent-local t) |
| 656 | (put 'tutorial--lang 'permanent-local t) | ||
| 657 | (put 'tutorial--point-before-chkeys 'permanent-local t) | ||
| 658 | |||
| 654 | (defun tutorial--save-on-kill () | 659 | (defun tutorial--save-on-kill () |
| 655 | "Query the user about saving the tutorial when killing Emacs." | 660 | "Query the user about saving the tutorial when killing Emacs." |
| 656 | (when (buffer-live-p tutorial--buffer) | 661 | (when (buffer-live-p tutorial--buffer) |