From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: mentioning variable aliases in `describe-variable' Date: Tue, 16 Jul 2002 13:31:35 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: <20020716131726.4190.LEKTU@terra.es> References: <20020712121334.2E82.LEKTU@terra.es> <200207121525.g6CFPXc07608@rum.cs.yale.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1026820271 5705 127.0.0.1 (16 Jul 2002 11:51:11 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 16 Jul 2002 11:51:11 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17UQrG-0001Tu-00 for ; Tue, 16 Jul 2002 13:51:10 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17UR2A-0004h8-00 for ; Tue, 16 Jul 2002 14:02:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17UQr1-0007Cb-00; Tue, 16 Jul 2002 07:50:55 -0400 Original-Received: from [62.22.27.141] (helo=mail.peoplecall.com) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17UQYZ-0006eS-00 for ; Tue, 16 Jul 2002 07:31:52 -0400 Original-Received: from [62.22.27.143] (jbarranquero.ofi.peoplecall.com [62.22.27.143]) by mail.peoplecall.com (8.11.6/8.11.6) with ESMTP id g6GBVTM16140; Tue, 16 Jul 2002 13:31:35 +0200 Original-To: "Stefan Monnier" , emacs-devel@gnu.org In-Reply-To: <200207121525.g6CFPXc07608@rum.cs.yale.edu> X-Mailer: Becky! ver. 2.05.03 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:5779 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:5779 On Fri, 12 Jul 2002 11:25:33 -0400, "Stefan Monnier" wrote: > I think that defvaralias should be extended to allow a docstring > (like I just did for defalias) The defalias docstring precludes describe-function from finding the argument list of built-ins, for example: ELISP> (defalias 'test 'aref "No doc.") aref ELISP> (describe-function 'test) #("test is an alias for `aref'.\n[Missing arglist. Please make a bug report.]\n\nNo doc." 0 22 nil 22 26 (help-args (aref) category #:help-function-button) 26 27 nil 27 28 nil 28 29 nil 29 75 nil 75 76 nil 76 83 nil) because the docstring for the alias does not have "\n\n(function ARGS)" at the end. Is that a bug or half a feature? I say "half" because you could do (defalias 'new-aref 'aref "New documentation.\n\n(aref TABLE INDEX)") to change the name of the arguments in the alias, and you'll get > new-aref is an alias for `aref'. > (aref TABLE INDEX) > > New documentation. but the name in the argument list must still be the old one. If it is a bug, AFAICS the only answers are either make `defalias' to add the arglist to the end of the docstring of aliased built-ins (messy, I think), or klugde `describe-function' to search the arglist of the primitive function if the alias has a docstring (ugh). Or document that you shouldn't add docstrings to aliases for built-ins :) /L/e/k/t/u