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

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

Supplying DOC string in a `defun' using `defvar'


From: ludvig-faddeev
Subject: Supplying DOC string in a `defun' using `defvar'
Date: Tue, 1 Jun 2021 03:00:53 +0200

> Sent: Tuesday, June 01, 2021 at 12:40 PM
> From: "Michael Heerdegen" <michael_heerdegen@web.de>
> To: help-gnu-emacs@gnu.org
> Subject: Re: Supplying DOC string in a `defun' using `defvar'
>
> Jean Louis <bugs@gnu.support> writes:
>
> > (defvar my-doc "Hello there")
> >
> > (defmacro my-fun ()
> >   `(defun my-fun ()
> >      ,my-doc
> >      (ignore)))
>
> Would you want the body to be stored in another defvar?  Then your code
> would be even smaller.
>
> I'm only partially joking, actually, not at all - is the function's
> documentation for your code's readers really that much less important
> than its code?  Maybe it's even the other way round?

I would still want to provide it, but want to keep user centered and developer
centered parts to be distinct.  Have worked with the literate programming 
environment
introduced by Knuth in the early 1980s but have not bought the result.




reply via email to

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