diff options
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index d7da7a2149a..fc5b092f7dd 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1649,14 +1649,22 @@ URLs." (replace-regexp-in-string (rx (or ;; Ignore some URLs. - (seq "http" (? "s") "://" (* anychar)) + (seq "http" (? "s") "://" (* nonl)) ;; Ignore these `substitute-command-keys' substitutions. (seq "\\" (or "=" (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)))) + (seq bol "(" (+ (any word "-/:[]&")) + ;; One or more arguments. + (+ " " (or + ;; Arguments. + (+ (or (syntax symbol) + (any word "-/:[]&=().?^\\#'"))) + ;; Argument that is a list. + (seq "(" (* (not ")")) ")"))) + ")"))) "" ;; Heuristic: assume these substitutions are of some length N. (replace-regexp-in-string |