all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* dynamical parts of a docstring
@ 2002-10-22 11:32 Klaus Berndl
  2002-10-22 14:55 ` Stefan Monnier <foo@acm.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Klaus Berndl @ 2002-10-22 11:32 UTC (permalink / raw)



Suppose i have an option XYZ with a docstring like:
"This is an example-docstring. You can set this option to any of the following
values:

<Here comes the dynamical part>"

Is it possible to add some elisp-code to a docstring which is evaluated at the
time the docstring is displayed (e.g. by calling `describe-variable' or
`customize-option') so the result of this code is added to the docstring at
display-time??

Many Thanks in advance,
Klaus

-- 
Klaus Berndl			mailto: klaus.berndl@sdm.de
sd&m AG				http://www.sdm.de
software design & management	
Thomas-Dehler-Str. 27, 81737 München, Germany
Tel +49 89 63812-392, Fax -220

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: dynamical parts of a docstring
  2002-10-22 11:32 dynamical parts of a docstring Klaus Berndl
@ 2002-10-22 14:55 ` Stefan Monnier <foo@acm.com>
  2002-10-22 15:22   ` Klaus Berndl
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier <foo@acm.com> @ 2002-10-22 14:55 UTC (permalink / raw)


>>>>> "Klaus" == Klaus Berndl <Klaus.Berndl@sdm.de> writes:
> Is it possible to add some elisp-code to a docstring which is evaluated at
> the time the docstring is displayed (e.g. by calling `describe-variable'
> or `customize-option') so the result of this code is added to the
> docstring at display-time??

Right now, no.  Someone requested the same kind of feature a year or two
ago, and a few days ago such a feature could have been used in order
not to duplicate the documentation of directory-files.

I think I even coded up a hack that allowed embedded elisp in docstrings
that looked like:

        Call a function and return \\\\(fun arg1 arg2).

but I think I had some problems because the escape sequence accidentally
appeared in a few pre-existing docstrings or somesuch.


        Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: dynamical parts of a docstring
  2002-10-22 14:55 ` Stefan Monnier <foo@acm.com>
@ 2002-10-22 15:22   ` Klaus Berndl
  0 siblings, 0 replies; 3+ messages in thread
From: Klaus Berndl @ 2002-10-22 15:22 UTC (permalink / raw)


On 22 Oct 2002, Stefan Monnier wrote:



> >>>>> "Klaus" == Klaus Berndl <Klaus.Berndl@sdm.de> writes:
> > Is it possible to add some elisp-code to a docstring which is evaluated at
> > the time the docstring is displayed (e.g. by calling `describe-variable'
> > or `customize-option') so the result of this code is added to the
> > docstring at display-time??
>  
>  Right now, no.  Someone requested the same kind of feature a year or two
>  ago, and a few days ago such a feature could have been used in order
>  not to duplicate the documentation of directory-files.
>  
>  I think I even coded up a hack that allowed embedded elisp in docstrings
>  that looked like:
>  
>          Call a function and return \\\\(fun arg1 arg2).

Sounds good, this would be exactly what I'm looking for!

>  
>  but I think I had some problems because the escape sequence accidentally
>  appeared in a few pre-existing docstrings or somesuch.

Thanks for your prompt answer! OK, there seem to be some backward-compatibility
issues for this feature. Nevertheless: Is there any hope for this feature
(maybe correcting these pre-existing dangerous doc-strings?) in near future?

Klaus

-- 
Klaus Berndl			mailto: klaus.berndl@sdm.de
sd&m AG				http://www.sdm.de
software design & management	
Thomas-Dehler-Str. 27, 81737 München, Germany
Tel +49 89 63812-392, Fax -220

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-10-22 15:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-22 11:32 dynamical parts of a docstring Klaus Berndl
2002-10-22 14:55 ` Stefan Monnier <foo@acm.com>
2002-10-22 15:22   ` Klaus Berndl

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.