all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'martin rudalics'" <rudalics@gmx.at>
Cc: 669@emacsbugs.donarmstrong.com
Subject: bug#669: 23.0.60; defalias is not taken into account by C-h k
Date: Wed, 13 Aug 2008 10:27:24 -0700	[thread overview]
Message-ID: <001d01c8fd69$da11c450$c2b22382@us.oracle.com> (raw)
In-Reply-To: <48A31466.9080401@gmx.at>

>  > If you use (defalias 'lisp-complete-symbol 'foo) instead, 
>  > then this is output:
>  >
>  > M-TAB (translated from <escape> <tab>) runs the command
>  > lisp-complete-symbol, which is an alias for `foo' in `lisp.el'.
>  >
>  > It is bound to M-TAB.
>  >
>  > (lisp-complete-symbol &optional predicate)
>  >
>  > This is still wrong, because `foo' is not in `lisp.el' 
>  > (and the defalias is not in `lisp.el').
>  >
>  > This bug appears as far back as Emacs 20.7.
>  >
>  >
>  >> From: Drew Adams Sent: Thursday, August 07, 2008 11:23 AM
>  >> emacs -Q
>  >>
>  >> (defun foo (&optional predicate)
>  >>   "" (interactive) (message "FOO"))
>  >>
>  >> (defalias 'lisp-complete-symbol (symbol-function 'foo))
>  >>
>  >> C-h k then shows this, which is 100% wrong:
>  >>
>  >> M-TAB (translated from <escape> <tab>) runs the command
>  >> lisp-complete-symbol, which is an interactive Lisp function in
>  >> `lisp.el'.
>  >>
>  >> It is bound to M-TAB.
>  >>
>  >> (lisp-complete-symbol &optional predicate)
> 
> I'm currently rewriting help-fns.el and can produce
> 
> M-TAB (translated from <escape> <tab>) runs the command
> lisp-complete-symbol, which is an interactive Lisp function.
> 
> It is bound to M-TAB, <menu-bar> <lisp-interaction>
> <lisp-complete-symbol>, H-SPC.
> 
> (lisp-complete-symbol &optional predicate)
> 
> and
> 
> M-TAB (translated from <escape> <tab>) runs the command
> lisp-complete-symbol, which is an alias for `foo'.
> 
> It is bound to M-TAB, <menu-bar> <lisp-interaction>
> <lisp-complete-symbol>, H-SPC.
> 
> (lisp-complete-symbol &optional predicate)
> 
> Are these acceptable?

Hi Martin, 

Thanks for working on this.

Not completely fixed yet, because it doesn't say anything about where `foo' is
defined (assuming it is defined in a file somewhere). If you could add that,
that would be great. The point is that we do want to send the user to the source
code, but not to the original `lisp-complete-symbol' source code.

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

And both of these cases need to be treated:

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

Thx - Drew







  reply	other threads:[~2008-08-13 17:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-07 18:23 bug#669: 23.0.60; defalias is not taken into account by C-h k Drew Adams
2008-08-07 20:54 ` Drew Adams
2008-08-13 17:05   ` martin rudalics
2008-08-13 17:27     ` Drew Adams [this message]
2008-08-13 21:17       ` martin rudalics
2008-08-13 21:41         ` Drew Adams
2008-08-14  6:18           ` martin rudalics
2008-08-14 15:33             ` Drew Adams
2008-08-14 20:03             ` Stefan Monnier
2008-08-14 20:00         ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001d01c8fd69$da11c450$c2b22382@us.oracle.com' \
    --to=drew.adams@oracle.com \
    --cc=669@emacsbugs.donarmstrong.com \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.