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

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

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


From: 2QdxY4RzWzUUiLuE
Subject: Re: Supplying DOC string in a `defun' using `defvar'
Date: Mon, 31 May 2021 17:14:29 -0700

On 2021-06-01 at 02:13:00 +0300,
Jean Louis <bugs@gnu.support> wrote:

> * ludvig-faddeev@gmx.com <ludvig-faddeev@gmx.com> [2021-06-01 02:00]:
> > Can the DOC string in a `defun' be supplied using a `defvar'?
> 
> Why not show your idea? I cannot understand that. I can think of this:
> 
> (defvar my-doc "Hello")
> 
> (defun my-fun ()
>   my-doc
>   (ignore))
> 
> It did not work, but I think it should.

Consider the following:

    (defvar *string* "hello, world")
    (defun foo ()
      *string*)

What would foo return?  What would its doc string be?



reply via email to

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