]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix substitution of pretty quotes in code in easy-mmode
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 3 Oct 2021 09:35:28 +0000 (11:35 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 3 Oct 2021 09:35:28 +0000 (11:35 +0200)
* lisp/emacs-lisp/easy-mmode.el (easy-mmode--arg-docstring): Adjust.
(easy-mmode--mode-docstring): Avoid making quotes into pretty
quotes in code (bug#50968).

lisp/emacs-lisp/easy-mmode.el

index d37bca24a0fd83b28f5b6f639c91160e121e4f77..f752861d80a818b87970195956adfb529c0b8426 100644 (file)
@@ -93,7 +93,7 @@ Enable the mode if ARG is nil, omitted, or is a positive number.
 Disable the mode if ARG is a negative number.
 
 To check whether the minor mode is enabled in the current buffer,
-evaluate `%S'.
+evaluate `%s'.
 
 The mode's hook is called both when the mode is enabled and when
 it is disabled.")
@@ -109,7 +109,9 @@ it is disabled.")
              (docs-fc (bound-and-true-p emacs-lisp-docstring-fill-column))
              (fill-column (if (integerp docs-fc) docs-fc 65))
              (argdoc (format easy-mmode--arg-docstring mode-pretty-name
-                             getter))
+                             ;; Avoid having quotes turn into pretty quotes.
+                             (string-replace "'" "\\\\='"
+                                             (format "%S" getter))))
              (filled (if (fboundp 'fill-region)
                          (with-temp-buffer
                            (insert argdoc)