diff options
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 8 | ||||
-rw-r--r-- | lisp/emacs-lisp/easy-mmode.el | 6 |
2 files changed, 12 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 527720c6e8d..1852471bcbb 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -3087,6 +3087,14 @@ To see the documentation for a defined struct type, use ;; and pred-check, so changing it is not straightforward. (push `(,defsym ,accessor (cl-x) ,(concat + ;; NB. This will produce incorrect results + ;; in some cases, as our coding conventions + ;; says that the first line must be a full + ;; sentence. However, if we don't word wrap + ;; we will have byte-compiler warnings about + ;; overly long docstrings. So we can't have + ;; a perfect result here, and choose to avoid + ;; the byte-compiler warnings. (internal--format-docstring-line "Access slot \"%s\" of `%s' struct CL-X." slot name) (if doc (concat "\n" doc) "")) 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. 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) |