(define-derived-mode): Fix bug#68600
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 21 Jan 2024 04:00:54 +0000 (23:00 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 21 Jan 2024 04:00:54 +0000 (23:00 -0500)
* lisp/emacs-lisp/derived.el (define-derived-mode): Use a reference
to the mode symbol instead of the mode's "pretty" name in
the hook variable's docstring.

lisp/emacs-lisp/derived.el

index 5c224362708edb0fcbd45e780796aacb53d48605..726f96a25f7bbfbae7f5550fb9244b18f541d87a 100644 (file)
@@ -211,10 +211,10 @@ See Info node `(elisp)Derived Modes' for more details.
        (defvar ,hook nil)
        (unless (get ',hook 'variable-documentation)
          (put ',hook 'variable-documentation
-              ,(format "Hook run after entering %s mode.
+              ,(format "Hook run after entering `%S'.
 No problems result if this variable is not bound.
 `add-hook' automatically binds it.  (This is true for all hook variables.)"
-                       name)))
+                       child)))
        (unless (boundp ',map)
         (put ',map 'definition-name ',child))
        (with-no-warnings (defvar ,map (make-sparse-keymap)))