Mercurial > emacs
changeset 55564:280f311afedb
(help-arg-highlighting-function, help-argument-name): Delete.
(help-default-arg-highlight): New function.
(help-do-arg-highlighting): Use it.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Thu, 13 May 2004 01:17:12 +0000 |
parents | a58f6db8bf3d |
children | 15d9218ad6f6 |
files | lisp/help-fns.el |
diffstat | 1 files changed, 9 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/help-fns.el Thu May 13 00:33:27 2004 +0000 +++ b/lisp/help-fns.el Thu May 13 01:17:12 2004 +0000 @@ -237,16 +237,14 @@ (concat "src/" file) file))))) -(defface help-argument-name '((t (:slant italic))) - "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-default-arg-highlight (arg) + "Default function to highlight arguments in *Help* buffers. +It returns ARG in lowercase italics, if the display supports it; +else ARG is returned in uppercase normal." + (let ((attrs '(:slant italic))) + (if (display-supports-face-attributes-p attrs) + (propertize (downcase arg) 'face attrs) + arg))) (defun help-do-arg-highlight (doc args) (with-syntax-table (make-syntax-table emacs-lisp-mode-syntax-table) @@ -264,7 +262,7 @@ "\\(?:es\\|s\\|th\\)?" ; for ARGth, ARGs "\\(?:-[a-z-]+\\)?" ; for ARG-xxx "\\>") ; end of word - (funcall help-arg-highlighting-function arg) + (help-default-arg-highlight arg) doc t t 1)))) doc))