GNU bug report logs - #55905
warn about misplaced or duplicated doc strings, `declare` or `interactive` forms

Previous Next

Package: emacs;

Reported by: Mattias Engdegård <mattiase <at> acm.org>

Date: Sat, 11 Jun 2022 12:08:01 UTC

Severity: normal

Done: Mattias Engdegård <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 55905 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: 55905 <at> debbugs.gnu.org
Subject: Re: bug#55905: warn about misplaced or duplicated doc strings,
 `declare` or `interactive` forms
Date: Sat, 11 Jun 2022 14:44:59 +0200
Mattias Engdegård <mattiase <at> acm.org> writes:

> 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.

This is most welcome -- I can never remember myself what the order of
declare and interactive is.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 2 years and 337 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.