]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix exiting Emacs after saving a tutorial
authorManuel Giraud <manuel@ledu-giraud.fr>
Fri, 29 Nov 2024 15:35:47 +0000 (16:35 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 4 Dec 2024 17:01:41 +0000 (18:01 +0100)
* 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)

(cherry picked from commit a8169bee2064282a40214ef65ef0493233ed4669)

lisp/tutorial.el

index d754db238de4a732324880e1b91aa1e0b68c48f1..86537d995fe1840eed4edcbdd341fddd84740f7a 100644 (file)
@@ -650,7 +650,12 @@ with some explanatory links."
          (delete-region prop-start prop-end))))))
 
 (defvar tutorial--starting-point)
+
+;; For when the user saves the TUTORIAL to a file.
 (put 'tutorial--starting-point 'permanent-local t)
+(put 'tutorial--lang 'permanent-local t)
+(put 'tutorial--point-before-chkeys 'permanent-local t)
+
 (defun tutorial--save-on-kill ()
   "Query the user about saving the tutorial when killing Emacs."
   (when (buffer-live-p tutorial--buffer)