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

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

Re: docstrings (was: Prefix Argument and optional argument)


From: Christopher Dimech
Subject: Re: docstrings (was: Prefix Argument and optional argument)
Date: Thu, 7 Jul 2022 19:06:37 +0200


> Sent: Friday, July 08, 2022 at 5:03 AM
> From: "Emanuel Berg" <incal@dataswamp.org>
> To: help-gnu-emacs@gnu.org
> Subject: docstrings (was: Re: Prefix Argument and optional argument)
>
> Christopher Dimech wrote:
>
> > (defun poke (prefix)
> >  "TODO."
> >  (interactive "P"))
> >
> > It is only because body is empty then, right?
>
> The way it is implemented actually the docstring is part of
> the body!

Which complicates things even more.  Why are we getting warnings then!!!

> Eval this which has the same interface/signature as the
> `defun' macro:
>
>   (defmacro defun-ds (name args &rest body)
>     (car body) )
>
> And then try it:
>
>   (defun-ds f (x) "Doc string." x)
>
> --
> underground experts united
> https://dataswamp.org/~incal
>
>
>



reply via email to

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