]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix false positives in docstring width warning with (fn...) constructs.
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 15 Jun 2021 13:33:03 +0000 (15:33 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 15 Jun 2021 13:33:19 +0000 (15:33 +0200)
* 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.)

lisp/emacs-lisp/bytecomp.el

index 5ed6bfeddccddb56048303b438af534cc6f1aa02..472e0ba3ba3e9690dd46b04130cc9500bc2ec578 100644 (file)
@@ -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