[Top][All Lists]

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

bug#669: 23.0.60; defalias is not taken into account by C-h k

From: martin rudalics
Subject: bug#669: 23.0.60; defalias is not taken into account by C-h k
Date: Wed, 13 Aug 2008 23:17:08 +0200
User-agent: Thunderbird (Windows/20080708)

> Not completely fixed yet, because it doesn't say anything about where `foo' is
> defined (assuming it is defined in a file somewhere).

If it is "defined in a file somewhere" you can jump to `foo' and see
where it is defined.  IIUC your assumption was that it's been defined
and evaluated in a buffer only.

> If you could add that,
> that would be great. The point is that we do want to send the user to the 
> code, but not to the original `lisp-complete-symbol' source code.

If it's defined in a file we can send the user to the source code in the

  (defalias 'lisp-complete-symbol 'foo)

case via the `foo' indirection but certainly _not_ in the

  (defalias 'lisp-complete-symbol (symbol-function 'foo))

because, well, look at the return value of (symbol-function 'foo).

> We also need to be sure that the `foo' doc string is used. In my test example 
> omitted that.

In the indirection case follow the link to `foo' and get its doc-string
from there.  In the `symbol-function' case you simply have to provide
your own doc-string via the third arg of `defalias'.

> And both of these cases need to be treated:
> (defalias 'lisp-complete-symbol 'foo)
> (defalias 'lisp-complete-symbol (symbol-function 'foo))

I suppose I posted the *Help* output for both cases.


reply via email to

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