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

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

Re: Lisp error on function :documentation


From: Michael Heerdegen
Subject: Re: Lisp error on function :documentation
Date: Mon, 17 Oct 2022 00:58:31 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Stefan Monnier via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:

> > Or maybe someone has added some nicer solution in the meantime? - I
> > don't recall.
>
> I don't know about nicer, but in Emacs-29, you can use `oclosure-lambda`
> to build a function tagged with a certain type on which you can dispatch
> via `cl-defmethod` and functions's docstrings are fetched via
> `function-documentation` which is a generic function to which you can
> add your own methods for your OClosure type, thus making it possible to
> dynamically build your docstring.

Oh, I think this was what I remembered, thanks.  It's IMO much nicer than
this messing with innards we used to do.  It's also easier to learn.

Or has using an oclosure just for the purpose of dynamical docstring
generation (larger) downsides?

Michael.




reply via email to

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