emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 1756e47: Fix false positives in docstring width warning with (fn.


From: Lars Ingebrigtsen
Subject: master 1756e47: Fix false positives in docstring width warning with (fn...) constructs.
Date: Tue, 15 Jun 2021 09:33:25 -0400 (EDT)

branch: master
commit 1756e4757cee336defa4aea667d0e991737f562c
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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.)
---
 lisp/emacs-lisp/bytecomp.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 5ed6bfe..472e0ba 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]