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: Improved help from minibuffer prompts Date: Fri, 30 Apr 2004 11:07:01 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20040430103926.28AB.JMBARRANQUERO@wke.es> References: <20040430014041.F09B.LEKTU@mi.madritel.es> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1083318133 8298 80.91.224.253 (30 Apr 2004 09:42:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 30 Apr 2004 09:42:13 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Apr 30 11:42:06 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 1BJUX0-0000AR-00 for ; Fri, 30 Apr 2004 11:42:06 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BJUX0-00007j-00 for ; Fri, 30 Apr 2004 11:42:06 +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 1BJUNW-0007jn-CM for emacs-devel@quimby.gnus.org; Fri, 30 Apr 2004 05:32:18 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BJUN4-0007jC-Ea for emacs-devel@gnu.org; Fri, 30 Apr 2004 05:31:50 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BJU6N-0004vu-Mw for emacs-devel@gnu.org; Fri, 30 Apr 2004 05:15:07 -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 1BJU5o-0004qC-5V for emacs-devel@gnu.org; Fri, 30 Apr 2004 05:14:00 -0400 Original-Received: from [62.22.181.117] (helo=idefix.laley.net) by mx20.gnu.org with esmtp (Exim 4.30) id 1BJTzN-0001cS-SJ for emacs-devel@gnu.org; Fri, 30 Apr 2004 05:07:22 -0400 Original-Received: from [172.17.221.23] (jsredondo.wk.org [172.17.221.23]) by idefix.laley.net with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2655.55) id JN3LK4A1; Fri, 30 Apr 2004 11:06:34 +0200 Original-To: emacs-devel@gnu.org In-Reply-To: X-Mailer: Becky! ver. 2.08.01 [en] 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:22419 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:22419 On Fri, 30 Apr 2004 07:32:48 +0200 Stefan Reich=F6r wrote: > I looks very good! Great. BTW, my implementation does not grok yet CL-style "&optional (variable default)" arglists. I'm working on it. I've also added a slight modification so (defun test (&rest buffer) "Do something to one or more BUFFERs." ...) will highlight BUFFER in the docstring (ignoring the plural ending, and the same for "es"). Related to CL arglists, `help-add-fundoc-usage' uses (roughly) (format "%s%s%s" ;; doc ;; whitespace ;; arglist doc ) As "%s" is equivalent to `princ', it does not quote, so an arglist like &optional (kind "") shows in the docstring as &optional (KIND ) (See `ebrowse-draw-file-member-info' for an example of the issue.) Does anyone anticipate problems with the following minimal patch? Juanma --- help-fns.el.orig 2004-04-30 10:36:06.000000000 +0200 +++ help-fns.el 2004-04-30 10:36:26.000000000 +0200 @@ -205,5 +205,5 @@ (if (or (string-match "\n\n(fn\\(\\( .*\\)?)\\)\\'" doc) (eq arglist t)) doc - (format "%s%s%s" doc + (format "%s%s%S" doc (if (string-match "\n?\n\\'" doc) (if (< (- (match-end 0) (match-beginning 0)) 2) "\n" "")