bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#55905: warn about misplaced or duplicated doc strings, `declare` or


From: Mattias Engdegård
Subject: bug#55905: warn about misplaced or duplicated doc strings, `declare` or `interactive` forms
Date: Sat, 11 Jun 2022 14:07:03 +0200

In function definitions, doc strings, `declare` and `interactive` forms are 
each optional but must appear in that order and duplications are not permitted. 
Many violations against these rules go undetected.

The attached patch adds checks to `defun` and `defmacro`. Violations result in 
compilation warnings but it could be changed into hard errors if desired. It 
also accepts `(:documentation EXPR)` as alternative to a doc string literal, 
which currently doesn't work i all cases.

Applying it reveals a handful of mistakes in the Emacs source tree, and in some 
external packages.

Attachment: 0001-function-and-macro-attribute-order-warning-patch.patch
Description: Binary data


reply via email to

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