From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: Bug: 22.1.50.1; eldoc-argument-case ignored Date: Thu, 23 Aug 2007 22:13:32 -0400 Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1187921628 22143 80.91.229.12 (24 Aug 2007 02:13:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 24 Aug 2007 02:13:48 +0000 (UTC) Cc: Nikolaj Schumacher To: emacs-pretest-bug@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 24 04:13:42 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 1IOOg9-0000NF-Js for ged-emacs-devel@m.gmane.org; Fri, 24 Aug 2007 04:13:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IOOg9-0007E1-1i for ged-emacs-devel@m.gmane.org; Thu, 23 Aug 2007 22:13:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IOOg3-0007DK-4Y for emacs-devel@gnu.org; Thu, 23 Aug 2007 22:13:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IOOg1-0007Cy-VC for emacs-devel@gnu.org; Thu, 23 Aug 2007 22:13:34 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IOOg1-0007Cv-QW for emacs-devel@gnu.org; Thu, 23 Aug 2007 22:13:33 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IOOg1-0004JM-Hx for emacs-devel@gnu.org; Thu, 23 Aug 2007 22:13:33 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1IOOg0-00079V-JQ; Thu, 23 Aug 2007 22:13:32 -0400 In-reply-to: (message from Nikolaj Schumacher on Wed, 22 Aug 2007 23:06:15 +0200) 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:77067 gmane.emacs.pretest.bugs:19608 Archived-At: Would someone please verify this, then install it if correct? Then please ack. To: emacs-pretest-bug@gnu.org From: Nikolaj Schumacher In-Reply-To: (Glenn Morris's message of "Sat\, 18 Aug 2007 19\:52\:03 -0400") Date: Wed, 22 Aug 2007 23:06:15 +0200 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Cc: Subject: Re: Bug: 22.1.50.1; eldoc-argument-case ignored --=-=-= Glenn Morris wrote: >> eldoc's new function argument highlighting seems to disregard >> `eldoc-argument-case', as setting it to 'downcase has no effect. > > Actually, I think it worked as well as it did before, which was only > sometimes. I believe I have fixed it now, but it's possible I have > just made a hideous mess. Thanks. As far as I can see, there's just a small issue. `eldoc-argument-case' is called with these arguments: "(foo" "bar" "baz)" It should probably be: "foo" "bar" "baz" for best backwards compatibility. The attached patch should take care of that. On a related issue, I strongly suggest making the highlighting face customizable. Currently 'bold is hardcoded. Patch is attached, as well. regards, Nikolaj Schumacher --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=emacs-eldoc-argument-case.patch Content-Description: eldoc-argument-case patch Index: lisp/emacs-lisp/eldoc.el =================================================================== RCS file: /sources/emacs/emacs/lisp/emacs-lisp/eldoc.el,v retrieving revision 1.47 diff -d -u -r1.47 eldoc.el --- lisp/emacs-lisp/eldoc.el 19 Aug 2007 03:04:13 -0000 1.47 +++ lisp/emacs-lisp/eldoc.el 22 Aug 2007 20:53:25 -0000 @@ -471,11 +476,12 @@ (defun eldoc-function-argstring-format (argstring) "Apply `eldoc-argument-case' to each word in argstring. The words \"&rest\", \"&optional\" are returned unchanged." - (mapconcat (lambda (s) - (if (member s '("&optional" "&rest")) - s - (funcall eldoc-argument-case s))) - (split-string argstring) " ")) + (concat "(" (mapconcat (lambda (s) + (if (member s '("&optional" "&rest")) + s + (funcall eldoc-argument-case s))) + (split-string (substring argstring 1 -1)) " ") + ")")) ;; When point is in a sexp, the function args are not reprinted in the echo ;; area after every possible interactive command because some of them print --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=emacs-eldoc-highlight-face.patch Content-Description: highlight face patch Index: lisp/emacs-lisp/eldoc.el =================================================================== RCS file: /sources/emacs/emacs/lisp/emacs-lisp/eldoc.el,v retrieving revision 1.47 diff -d -u -r1.47 eldoc.el --- lisp/emacs-lisp/eldoc.el 19 Aug 2007 03:04:13 -0000 1.47 +++ lisp/emacs-lisp/eldoc.el 22 Aug 2007 20:31:35 -0000 @@ -101,6 +101,11 @@ enable argument list to fit on one line" truncate-sym-name-if-fit)) :group 'eldoc) +(defface eldoc-highlight-function-argument-face + '((default (:weight bold))) + "*Face used for the argument at point in a function's argument list." + :group 'eldoc) + ;;; No user options below here. (defvar eldoc-message-commands-table-size 31 @@ -303,7 +308,7 @@ In the absence of INDEX, just call `eldoc-docstring-format-sym-doc'." (let ((start nil) (end 0) - (argument-face 'bold)) + (argument-face 'eldoc-highlight-function-argument-face)) ;; Find the current argument in the argument string. We need to ;; handle `&rest' and informal `...' properly. ;; --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --=-=-=--