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: new *Help* argument highlighting Date: Tue, 11 May 2004 11:02:20 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20040511110028.75FC.JMBARRANQUERO@wke.es> References: <20040511000920.AE85.LEKTU@mi.madritel.es> <20040510222621.GC12917@fencepost> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1084266728 1720 80.91.224.253 (11 May 2004 09:12:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 11 May 2004 09:12:08 +0000 (UTC) Cc: Miles Bader Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue May 11 11:12:03 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 1BNTIw-0005DK-00 for ; Tue, 11 May 2004 11:12:02 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BNTIw-0007vW-00 for ; Tue, 11 May 2004 11:12:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BNTAd-0006Qo-0h for emacs-devel@quimby.gnus.org; Tue, 11 May 2004 05:03:27 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BNTAD-0006I9-Cw for emacs-devel@gnu.org; Tue, 11 May 2004 05:03:01 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BNT9a-0005Ea-PR for emacs-devel@gnu.org; Tue, 11 May 2004 05:02:56 -0400 Original-Received: from [62.22.181.117] (helo=idefix.laley.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BNT9Z-0005Ai-6c; Tue, 11 May 2004 05:02:21 -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 K4TS1G3F; Tue, 11 May 2004 11:02:17 +0200 Original-To: emacs-devel@gnu.org In-Reply-To: <20040510222621.GC12917@fencepost> 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:23123 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23123 On Mon, 10 May 2004 18:26:21 -0400 Miles Bader wrote: > Then change the docstring for the help-arguments face to say `you might want > to change this variable too'. Patch attached. (I'm not commiting it yet, let's see if the dust settles...) Juanma --- help-fns.el.orig 2004-05-09 21:02:38.000000000 +0200 +++ help-fns.el 2004-05-11 10:59:31.000000000 +0200 @@ -239,5 +239,13 @@ (defface help-argument-name '((t (:slant italic))) - "Face to highlight function arguments in docstrings.") + "Face to highlight function arguments in *Help* buffers. +You can customize this face. For more extensive customization, +see variable `help-arg-highlighting-function'.") + +(defvar help-arg-highlighting-function + #'(lambda (arg) (propertize (downcase arg) 'face 'help-argument-name)) + "Function to call to highlight function arguments in *Help* buffers. +The function receives the argument to highlight, as a string. +It must return the string with the desired highlighting (properties).") (defun help-do-arg-highlight (doc args) @@ -248,5 +256,5 @@ (setq doc (replace-regexp-in-string (concat "\\<\\(" arg "\\)\\(?:es\\|s\\|th\\)?\\>") - (propertize arg 'face 'help-argument-name) + (funcall help-arg-highlighting-function arg) doc t t 1)))) doc))