emacs-devel
[Top][All Lists]
Advanced

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

Re: Better help support for EIEIO classes and methods


From: David Engster
Subject: Re: Better help support for EIEIO classes and methods
Date: Tue, 05 Feb 2013 22:23:51 +0100
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.92 (gnu/linux)

Stefan Monnier writes:
>> Then do a describe-function on semanticdb-file-table. You'll get this:
>
>> ,----
>> | semanticdb-file-table is a Lisp function in `db.el'.
>> | 
>> | (semanticdb-file-table &rest LOCAL-ARGS)
>> | 
>> | From OBJ, return FILENAME's associated table object.
>> `----
>
>> Now, this is pretty misleading since there are actually two
>> implementations of this function, which will become clear if you use
>> eieio-describe-generic, which will give you this:
>
> Here's a suggestion: in describe-function-1 we do:
>
>           (help-fns--compiler-macro function)
>           (help-fns--parent-mode function)
>           (help-fns--obsolete function)
>
> How 'bout we replace that with
>
>     (run-hook-with-args 'help-fns-describe-function-functions function)
>
> So EIEIO can add some text between "(semanticdb-file-table &rest
> LOCAL-ARGS)" and "From OBJ, return FILENAME's associated table object."?

I guess that could work. I still think it would be a bit confusing: in
the first line it says this is a "lisp function in 'db.el'", and
clicking on the link will only lead to the beginning of the file because
the definition cannot be found. Then further down are the actual links
to the implementations. But I think it is best if I just fix up an
initial patch and see how it works out in practice. If it is too
confusing, I can simply change that first line, too.

>> This is already pretty good, but is still lacking an IMO crucial
>> feature: the filenames 'db.el' and 'db-global.el' are not
>> links. However, just do
>> (add-hook 'temp-buffer-show-hook 'eieio-help-mode-augmentation-maybee t)
>
> Can't you insert the `db.el' and `db-globals.el' directly as buttons?
> Or does something later strip away the text-properties of those buttons?
> If that's the case, maybe we could fix that problem.

I don't see why they couldn't be inserted directly. It guess this hack
above is for historical reasons, when Eric wanted to reuse as much code
from describe-function as possible and the augmentation function became
bigger and bigger over the years.

-David



reply via email to

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