summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2021-06-15 15:33:03 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2021-06-15 15:33:19 +0200
commit1756e4757cee336defa4aea667d0e991737f562c (patch)
tree0ff6d5323f1d3d8a1624fc6d1c67d221855209cf /lisp/emacs-lisp
parent1956d98cabd957360317b72be52a9624801a54ef (diff)
downloademacs-1756e4757cee336defa4aea667d0e991737f562c.tar.gz
emacs-1756e4757cee336defa4aea667d0e991737f562c.tar.bz2
emacs-1756e4757cee336defa4aea667d0e991737f562c.zip
Fix false positives in docstring width warning with (fn...) constructs.
* lisp/emacs-lisp/bytecomp.el (byte-compile--wide-docstring-p): Don't consider the function signature when determining whether the doc string is too wide (bug#49007). (The signature is folded later when displaying help.)
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/bytecomp.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 5ed6bfeddcc..472e0ba3ba3 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1635,7 +1635,10 @@ URLs."
;; Ignore these `substitute-command-keys' substitutions.
(seq "\\" (or "="
(seq "<" (* (not ">")) ">")
- (seq "{" (* (not "}")) "}")))))
+ (seq "{" (* (not "}")) "}")))
+ ;; Ignore the function signature that's stashed at the end of
+ ;; the doc string (in some circumstances).
+ (seq bol "(fn (" (* nonl))))
""
;; Heuristic: assume these substitutions are of some length N.
(replace-regexp-in-string