[Top][All Lists]

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

enforce/automate docstring correctnes (was: Re: docstrings)

From: Emanuel Berg
Subject: enforce/automate docstring correctnes (was: Re: docstrings)
Date: Thu, 07 Jul 2022 21:42:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Instead of relying on humans not forgetting anything and also
getting the order and CAPS of the args the right way in the
docstrings, possibly after having (checkdoc-current-buffer t)
telling them about it - and incal yanking it on - it could be both enforced and automated
like this:

(defun (f "Advanced Functional Programming function") ((a "AFA Doku")
                                                       (o "Omega Supreme") )
  (+ a o) )

Because then, not providing docstrings everywhere would not
eval and `help-mode' would display it the correct way
including order. It'd be a Lisp OO thing; and Emacs' claim to
be "self-documenting" would ring not true but truer.


Why, you think the code looks too bad that way?


(defun f (a o)
"This is an Advanced Functional Programming function.

A is AFA Doku.

O is Omega Supreme."
  (+ a o) )

See? Not by much!

underground experts united

reply via email to

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