From 701068acd90e5d5cd9b12cb7541a9020568a9893 Mon Sep 17 00:00:00 2001 From: Michael Heerdegen Date: Tue, 9 Jul 2024 02:32:54 +0200 Subject: [PATCH] WIP: Minor improvement in easy-mmode--mode-docstring --- lisp/emacs-lisp/easy-mmode.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 2c12454af5c..2d6333f146f 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -91,7 +91,7 @@ easy-mmode--arg-docstring Disable the mode if ARG is a negative number. To check whether the minor mode is enabled in the current buffer, -evaluate the variable `%s'. +evaluate %s. The mode's hook is called both when the mode is enabled and when it is disabled.") @@ -128,8 +128,9 @@ easy-mmode--mode-docstring easy-mmode--arg-docstring (if global "global " "") mode-pretty-name - ;; Avoid having quotes turn into pretty quotes. - (string-replace "'" "\\='" (format "%S" getter))))) + (format (if (symbolp getter) "the variable `%s'" "%s") + ;; Avoid having quotes turn into pretty quotes. + (help--docstring-quote (format "%S" getter)))))) (let ((start (point))) (insert argdoc) (when (fboundp 'fill-region) ;Don't break bootstrap! -- 2.39.2