From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Improved help from minibuffer prompts Date: 01 May 2004 16:23:07 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <20040430232000.AEC0.LEKTU@mi.madritel.es> <20040501034809.AEC7.LEKTU@mi.madritel.es> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1083443191 9070 80.91.224.253 (1 May 2004 20:26:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 1 May 2004 20:26:31 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat May 01 22:26:23 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BK143-0001kH-00 for ; Sat, 01 May 2004 22:26:23 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BK143-0001NS-00 for ; Sat, 01 May 2004 22:26:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BK12x-000602-Sr for emacs-devel@quimby.gnus.org; Sat, 01 May 2004 16:25:15 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BK11s-0005N4-KW for emacs-devel@gnu.org; Sat, 01 May 2004 16:24:08 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BK112-0004Kl-Sp for emacs-devel@gnu.org; Sat, 01 May 2004 16:23:50 -0400 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.30) id 1BK111-000429-HM for emacs-devel@gnu.org; Sat, 01 May 2004 16:23:15 -0400 Original-Received: from [206.47.199.141] (helo=simmts12-srv.bellnexxia.net) by mx20.gnu.org with esmtp (Exim 4.30) id 1BK10y-0006mr-Il for emacs-devel@gnu.org; Sat, 01 May 2004 16:23:12 -0400 Original-Received: from empanada.local ([67.71.116.192]) by simmts12-srv.bellnexxia.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20040501202309.SBMY25455.simmts12-srv.bellnexxia.net@empanada.local>; Sat, 1 May 2004 16:23:09 -0400 Original-Received: by empanada.local (Postfix, from userid 502) id EDE7A17101D; Sat, 1 May 2004 16:23:07 -0400 (EDT) Original-To: Juanma Barranquero In-Reply-To: <20040501034809.AEC7.LEKTU@mi.madritel.es> Original-Lines: 36 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:22504 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:22504 > The problem is, describe-function-1 is a big hairy function with a > complex program flow. Yes. I'd just call it ugly. > describe-function-1 uses princ to output data to the current buffer, Yup and there's only one place where this happens, so despite the ugly control flow there's clearly just one place where you can insert a call to your function, knowing that the arglist has just been inserted at point. Maybe the best way is not to call your new function right then and there. Maybe it's better to just remember the buffer position of start&end of arglist and do the highlighting later. > All in all, I really doubt the result is easier to understand or > maintain. It's more robust since it does not assume the arglist is printed and it does not make assumption about where it's printed, etc... > - No heuristics to determine what's a usage doc and what's simply doc. > OK, but the format of docs is something we control so we can be > reasonably sure it's working, and we can always adapt > help-highlight-arguments if necessary. I'm reasonably sure I can already come up with an example where your code ends up doing funny things. > - All functions that use describe-function-1 are automatically > highlighted. Irrelevant indeed. Stefan