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

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

[External] : Supplying DOC string in a `defun' using `defvar'


From: Christopher Dimech
Subject: [External] : Supplying DOC string in a `defun' using `defvar'
Date: Thu, 3 Jun 2021 17:34:49 +0200

> Sent: Friday, June 04, 2021 at 3:10 AM
> From: "Stefan Monnier" <monnier@iro.umontreal.ca>
> To: "Christopher Dimech" <dimech@gmx.com>
> Cc: "Drew Adams" <drew.adams@oracle.com>, "help-gnu-emacs@gnu.org" 
> <help-gnu-emacs@gnu.org>
> Subject: Re: [External] : Supplying DOC string in a `defun' using `defvar'
>
> > Lars mentioned that although using :documentation works, "(:documentation 
> > <foo>)" is
> > a non-standard way of setting things up in contrast to something like
> > "(declare (documentation ...))"
> >
> > What do you think?
>
> Most uses of this `:documentation` feature are for dynamically created
> functions, and those typically don't use `defun` but something like
> `defalias+lambda`.  `declare`, OTOH is a property of `defun` and isn't
> supported inside `lambda`, so it's not clear how that could be made
> to work.
>         Stefan

Would I need to update the :documentation declaration after the transition to 
default
lexical binding becomes official?

It is acceptable to use the property of `defun` for the documentation.  For 
anonymous
functions, I do not think one needs elaborate ways to set the documentation - a 
normal
description is good enough.







reply via email to

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