This is the mail archive of the guile-emacs@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: scheme-describe-symbol


Kalle Olavi Niemitalo <tosi@ees2.oulu.fi> writes:

> > (define + -)
> > (+ 1 2)
> > 
> > In this case, we may want to find the documentation of `-' instead of
> > that of `+'.
> 
> Must there still be a way to get the documentation of `+'?

Maybe not...

> > We could combine these two functions into one command, though.
> I believe that would be easier for users.

Right.  One more reason why I thought two commands is to distinguish
function references and variable references; that is, suppose the point
is on `bar' in the following expression:

  (foo bar)
       ^
One may want to search for `foo' when one type C-h f and for `bar'
when one type C-h v.  So I guess we should define one function
`scheme-describe-object' and two commands `scheme-describe-function'
and `scheme-describe-variable'.  How about that?

Also I think it would be a good idea to generalize these help functions.
We could define `mode-describe-function', which calls an appropriate
describe function indirectly according to the current major-mode.  If
one type C-u M-x mode-describe-function, it asks the major-mode to search.

A major-mode can be defined as a class in terms of GOOPS.  We could
define the above functions as generic functions.  I'd like to organize
many concepts in Emacs in terms of OOP.  The current implementation of
Emacs seems very messy to me...

> > `+' is a method.
> 
> No, it's a generic function.  ;-)

What is the difference between a method and a generic function exactly?
A method is each definition in a generic function, maybe?  I guess I
need to study CLOS first...

-- Kei

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]