]> git.eshelyaron.com Git - emacs.git/commit
Make byte-compiler warn about wide docstrings
authorStefan Kangas <stefan@marxist.se>
Sun, 6 Dec 2020 11:44:19 +0000 (12:44 +0100)
committerStefan Kangas <stefan@marxist.se>
Mon, 28 Dec 2020 05:26:52 +0000 (06:26 +0100)
commit0ebea8ffbfb7b9b1bd92f30011df0875b54eb663
tree1160c96525469cf2be56f18448ec485e8b50a531
parented30956099fff5025698c8ffdd9e876f207ed2af
Make byte-compiler warn about wide docstrings

* lisp/emacs-lisp/bytecomp.el (byte-compile--wide-docstring-p):
(byte-compile-docstring-length-warn): New defuns.
(byte-compile-docstring-max-column): New defcustom.
(byte-compile--wide-docstring-substitution-len): New variable.
(byte-compile-warning-types, byte-compile-warnings): New value
'docstrings'.
(byte-compile-file-form-autoload, byte-compile-file-form-defvar):
(byte-compile-file-form-defvar-function, byte-compile-lambda):
(byte-compile-defvar, byte-compile-file-form-defalias): Warn about too
wide docstrings.  (Bug#44858)

* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-warn-wide-docstring/defconst)
(bytecomp-warn-wide-docstring/defvar): New tests.
(bytecomp--define-warning-file-test): New macro.
(bytecomp/warn-wide-docstring-autoload\.el)
(bytecomp/warn-wide-docstring-custom-declare-variable\.el)
(bytecomp/warn-wide-docstring-defalias\.el)
(bytecomp/warn-wide-docstring-defconst\.el)
(bytecomp/warn-wide-docstring-define-abbrev-table\.el)
(bytecomp/warn-wide-docstring-define-obsolete-function-alias\.el)
(bytecomp/warn-wide-docstring-define-obsolete-variable-alias\.el)
(bytecomp/warn-wide-docstring-defun\.el)
(bytecomp/warn-wide-docstring-defvar\.el)
(bytecomp/warn-wide-docstring-defvaralias\.el)
(bytecomp/warn-wide-docstring-ignore-fill-column\.el)
(bytecomp/warn-wide-docstring-ignore-override\.el)
(bytecomp/warn-wide-docstring-ignore\.el)
(bytecomp/warn-wide-docstring-multiline-first\.el)
(bytecomp/warn-wide-docstring-multiline\.el): New tests.
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-autoload.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-custom-declare-variable.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-defalias.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-defconst.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-define-abbrev-table.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-define-obsolete-function-alias.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-define-obsolete-variable-alias.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-defun.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-defvar.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-defvaralias.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-ignore-fill-column.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-ignore-override.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-ignore.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-multiline-first.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-multiline.el:
New files.
19 files changed:
etc/NEWS
etc/TODO
lisp/emacs-lisp/bytecomp.el
test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-autoload.el [new file with mode: 0644]
test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-custom-declare-variable.el [new file with mode: 0644]
test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-defalias.el [new file with mode: 0644]
test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-defconst.el [new file with mode: 0644]
test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-define-abbrev-table.el [new file with mode: 0644]
test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-define-obsolete-function-alias.el [new file with mode: 0644]
test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-define-obsolete-variable-alias.el [new file with mode: 0644]
test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-defun.el [new file with mode: 0644]
test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-defvar.el [new file with mode: 0644]
test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-defvaralias.el [new file with mode: 0644]
test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-ignore-fill-column.el [new file with mode: 0644]
test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-ignore-override.el [new file with mode: 0644]
test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-ignore.el [new file with mode: 0644]
test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-multiline-first.el [new file with mode: 0644]
test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-multiline.el [new file with mode: 0644]
test/lisp/emacs-lisp/bytecomp-tests.el