[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new *Help* argument highlighting
From: |
Juanma Barranquero |
Subject: |
Re: new *Help* argument highlighting |
Date: |
Tue, 11 May 2004 11:02:20 +0200 |
On Mon, 10 May 2004 18:26:21 -0400
Miles Bader <address@hidden> 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))
- Re: new *Help* argument highlighting, (continued)
- fill docstring (Re: new *Help* argument highlighting), Kenichi Handa, 2004/05/12
- Re: new *Help* argument highlighting, Kenichi Handa, 2004/05/16
- Re: new *Help* argument highlighting, Juanma Barranquero, 2004/05/17
- Re: new *Help* argument highlighting, Kenichi Handa, 2004/05/17
- Re: new *Help* argument highlighting, Juanma Barranquero, 2004/05/12
- Re: new *Help* argument highlighting, Kenichi Handa, 2004/05/12
- Re: new *Help* argument highlighting, Juanma Barranquero, 2004/05/12
- Re: new *Help* argument highlighting,
Juanma Barranquero <=
- Re: new *Help* argument highlighting, Kenichi Handa, 2004/05/10
- Re: new *Help* argument highlighting, Juanma Barranquero, 2004/05/11
- Re: new *Help* argument highlighting, Richard Stallman, 2004/05/11
- Re: new *Help* argument highlighting, Juanma Barranquero, 2004/05/11
- Re: new *Help* argument highlighting, David Kastrup, 2004/05/11
- Re: new *Help* argument highlighting, Juanma Barranquero, 2004/05/11
- Re: new *Help* argument highlighting, Richard Stallman, 2004/05/12
- Re: new *Help* argument highlighting, Stefan Monnier, 2004/05/12
- Re: new *Help* argument highlighting, Miles Bader, 2004/05/12
- Re: new *Help* argument highlighting, Juanma Barranquero, 2004/05/12