aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2021-10-03 11:35:28 +0200
committerLars Ingebrigtsen2021-10-03 11:35:28 +0200
commit7fb27895090f8f9fe6cfa6311a77ec2c794adc84 (patch)
tree482700f6d45c407035bbdbcddad977bb74177b55
parentb47d7ce1b87ee8bbbb04ce2b784af57ece17177f (diff)
downloademacs-7fb27895090f8f9fe6cfa6311a77ec2c794adc84.tar.gz
emacs-7fb27895090f8f9fe6cfa6311a77ec2c794adc84.zip
Fix substitution of pretty quotes in code in easy-mmode
* 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).
-rw-r--r--lisp/emacs-lisp/easy-mmode.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index d37bca24a0f..f752861d80a 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -93,7 +93,7 @@ Enable the mode if ARG is nil, omitted, or is a positive number.
93Disable the mode if ARG is a negative number. 93Disable the mode if ARG is a negative number.
94 94
95To check whether the minor mode is enabled in the current buffer, 95To check whether the minor mode is enabled in the current buffer,
96evaluate `%S'. 96evaluate `%s'.
97 97
98The mode's hook is called both when the mode is enabled and when 98The mode's hook is called both when the mode is enabled and when
99it is disabled.") 99it is disabled.")
@@ -109,7 +109,9 @@ it is disabled.")
109 (docs-fc (bound-and-true-p emacs-lisp-docstring-fill-column)) 109 (docs-fc (bound-and-true-p emacs-lisp-docstring-fill-column))
110 (fill-column (if (integerp docs-fc) docs-fc 65)) 110 (fill-column (if (integerp docs-fc) docs-fc 65))
111 (argdoc (format easy-mmode--arg-docstring mode-pretty-name 111 (argdoc (format easy-mmode--arg-docstring mode-pretty-name
112 getter)) 112 ;; Avoid having quotes turn into pretty quotes.
113 (string-replace "'" "\\\\='"
114 (format "%S" getter))))
113 (filled (if (fboundp 'fill-region) 115 (filled (if (fboundp 'fill-region)
114 (with-temp-buffer 116 (with-temp-buffer
115 (insert argdoc) 117 (insert argdoc)