From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: Patch: make eldoc indicate current argument Date: Wed, 27 Jun 2007 22:48:46 -0600 Message-ID: References: Reply-To: tromey@redhat.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1183007321 5708 80.91.229.12 (28 Jun 2007 05:08:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 28 Jun 2007 05:08:41 +0000 (UTC) Cc: emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 28 07:08:39 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I3mFD-00080H-Ji for ged-emacs-devel@m.gmane.org; Thu, 28 Jun 2007 07:08:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I3mFC-0005RN-LD for ged-emacs-devel@m.gmane.org; Thu, 28 Jun 2007 01:08:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I3mF7-0005PB-A0 for emacs-devel@gnu.org; Thu, 28 Jun 2007 01:08:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I3mF6-0005Nz-A8 for emacs-devel@gnu.org; Thu, 28 Jun 2007 01:08:32 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I3mF6-0005Ng-5P for emacs-devel@gnu.org; Thu, 28 Jun 2007 01:08:32 -0400 Original-Received: from mx1.redhat.com ([66.187.233.31]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I3mF5-0001vW-2P; Thu, 28 Jun 2007 01:08:31 -0400 Original-Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l5S58OYV027976; Thu, 28 Jun 2007 01:08:24 -0400 Original-Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l5S58Ou6018079; Thu, 28 Jun 2007 01:08:24 -0400 Original-Received: from opsy.redhat.com (ton.toronto.redhat.com [172.16.14.15]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l5S58MtH015828; Thu, 28 Jun 2007 01:08:23 -0400 Original-Received: by opsy.redhat.com (Postfix, from userid 500) id 305CE378B08; Wed, 27 Jun 2007 22:48:46 -0600 (MDT) X-Attribution: Tom In-Reply-To: (Richard Stallman's message of "Wed\, 27 Jun 2007 19\:42\:53 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.990 (gnu/linux) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:73964 Archived-At: >>>>> "rms" == Richard Stallman writes: > * Emacs formats documentation inconsistently. Some functions use > &optional and &rest in their description. rms> I think you are talking about calling patterns in doc strings, not rms> about documentation in general. Is that right? Yes. Sorry about that. This patch & my comments are solely about eldoc and thus doc strings. rms> Do you mean this? rms> (when COND BODY ...) rms> If so, I think that is a misunderstanding. The ellipsis here is not rms> an argument name, it is just an ellipsis. The space after `BODY' has rms> no significance. Yeah, my terminology was a bit lax. Anyway, sometimes there is a space, and sometimes not. And this means that with this patch occasionally something like "FOO..." is bold, and sometimes just the "...". Also the modified code doesn't understand that "..." refers to all remaining arguments; so for instance in: (when (cond) (f1) (f2) (f3)) ... if point is on (f3), nothing will be made bold in the description. Personally I find these buglets to be minor. But others may disagree. rms> Perhaps we should delete that space, for consistency. rms> Would someone like to do that? Not me :-). > * If the documentation comments had a bit more structure, this could > also show the description of the current argument, say as a tooltip. > I don't think there is a reliable way to extract this information at > present. rms> Alas, this would be a tremendous rewrite, and could make the doc rms> strings less readable for their current use if we're not careful. Good example here, thanks. Well, another idea is to display the full documentation comment in a tooltip, perhaps in response to some key. This is really a side idea: it is something I've seen in Eclipse and which is occasionally useful, and I thought maybe it would also be useful in Emacs. But the patch at hand doesn't really need this. Tom