aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emacs-lisp/bytecomp.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index fb4b73b1c14..aa9521e5a65 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1772,10 +1772,16 @@ It is too wide if it has any lines longer than the largest of
1772 kind name col)) 1772 kind name col))
1773 ;; There's a "naked" ' character before a symbol/list, so it 1773 ;; There's a "naked" ' character before a symbol/list, so it
1774 ;; should probably be quoted with \=. 1774 ;; should probably be quoted with \=.
1775 (when (string-match-p "\\( [\"#]\\|[ \t]\\|^\\)'[a-z(]" docs) 1775 (when (string-match-p (rx (| (in " \t") bol)
1776 (? (in "\"#"))
1777 "'"
1778 (in "A-Za-z" "("))
1779 docs)
1776 (byte-compile-warn-x 1780 (byte-compile-warn-x
1777 name "%s%sdocstring has wrong usage of unescaped single quotes (use \\= or different quoting)" 1781 name
1778 kind name)) 1782 (concat "%s%sdocstring has wrong usage of unescaped single quotes"
1783 " (use \\=%c or different quoting such as %c...%c)")
1784 kind name ?' ?` ?'))
1779 ;; There's a "Unicode quote" in the string -- it should probably 1785 ;; There's a "Unicode quote" in the string -- it should probably
1780 ;; be an ASCII one instead. 1786 ;; be an ASCII one instead.
1781 (when (byte-compile-warning-enabled-p 'docstrings-non-ascii-quotes) 1787 (when (byte-compile-warning-enabled-p 'docstrings-non-ascii-quotes)