Nicolas Goaziou <m...@nicolasgoaziou.fr> writes:

> Do we need another variable for that? Could
> org-eldoc-documentation-function catch wrong-number-of-arguments error,
> and try another call instead?

I believe that the issue is org-eldoc-documentation-function itself is
called with the wrong number of arguments; the new behaviour of
eldoc-mode is to call the documentation functions with a callback
argument, that the documentation function invokes to return its value,
unless the strategy is a function.

>From the docstring for eldoc-documentation-strategy:

> ...
> For backward compatibility to the "old" protocol, this variable
> can also be set to a function that returns nil or a doc string,
> depending whether or not there is documentation to display at
> all.

Another approach would be to, I suppose, make
org-eldoc-documentation-function take an optional callback argument
(defaulting to identity) and either wrap the whole body of
the function in a funcall of that function or pass the callback to all
the functions that org-eldoc-documentation-function calls.

Reply via email to