From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs 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 Message-ID: <001d01c8fd69$da11c450$c2b22382@us.oracle.com> References: <002201c8f8ba$a2eebea0$c2b22382@us.oracle.com> <003201c8f8cf$bafb9df0$c2b22382@us.oracle.com> <48A31466.9080401@gmx.at> Reply-To: Drew Adams , 669@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1218649720 25733 80.91.229.12 (13 Aug 2008 17:48:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Aug 2008 17:48:40 +0000 (UTC) Cc: 669@emacsbugs.donarmstrong.com To: "'martin rudalics'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 13 19:49:32 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KTKSY-0003Bo-0w for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Aug 2008 19:48:34 +0200 Original-Received: from localhost ([127.0.0.1]:58412 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KTKRb-0007yH-PD for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Aug 2008 13:47:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KTKRX-0007xV-6Z for bug-gnu-emacs@gnu.org; Wed, 13 Aug 2008 13:47:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KTKRU-0007wQ-Rs for bug-gnu-emacs@gnu.org; Wed, 13 Aug 2008 13:47:30 -0400 Original-Received: from [199.232.76.173] (port=40552 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KTKRU-0007wJ-EF for bug-gnu-emacs@gnu.org; Wed, 13 Aug 2008 13:47:28 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:44451) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KTKRT-0000GU-OC for bug-gnu-emacs@gnu.org; Wed, 13 Aug 2008 13:47:28 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7DHlPAx026026; Wed, 13 Aug 2008 10:47:25 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m7DHZ3Gc021861; Wed, 13 Aug 2008 10:35:03 -0700 X-Loop: don@donarmstrong.com Resent-From: "Drew Adams" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 13 Aug 2008 17:35:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 669 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 669-submit@emacsbugs.donarmstrong.com id=B669.121864856220170 (code B ref 669); Wed, 13 Aug 2008 17:35:03 +0000 Original-Received: (at 669) by emacsbugs.donarmstrong.com; 13 Aug 2008 17:29:22 +0000 Original-Received: from rgminet01.oracle.com (rgminet01.oracle.com [148.87.113.118]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7DHTIAI020164 for <669@emacsbugs.donarmstrong.com>; Wed, 13 Aug 2008 10:29:19 -0700 Original-Received: from agmgw1.us.oracle.com (agmgw1.us.oracle.com [152.68.180.212]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m7DHTBhx016542; Wed, 13 Aug 2008 11:29:11 -0600 Original-Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by agmgw1.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m7DFMh7Y022804; Wed, 13 Aug 2008 11:29:10 -0600 Original-Received: from inet-141-146-46-1.oracle.com by acsmt356.oracle.com with ESMTP id 11462082711218648443; Wed, 13 Aug 2008 10:27:23 -0700 Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 13 Aug 2008 10:27:23 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <48A31466.9080401@gmx.at> Thread-Index: Acj9Zy7gxAPrSi/zS8O4lfEsBiDUzQAAW0Tw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Wed, 13 Aug 2008 13:47:30 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:19387 Archived-At: > > If you use (defalias 'lisp-complete-symbol 'foo) instead, > > then this is output: > > > > M-TAB (translated from ) 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 ) 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 ) runs the command > lisp-complete-symbol, which is an interactive Lisp function. > > It is bound to M-TAB, > , H-SPC. > > (lisp-complete-symbol &optional predicate) > > and > > M-TAB (translated from ) runs the command > lisp-complete-symbol, which is an alias for `foo'. > > It is bound to M-TAB, > , 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