# HG changeset patch # User Juanma Barranquero # Date 1086391500 0 # Node ID b917393b9c8cba417f7d47cca68fc084918d2610 # Parent 3146bd943af1d4b07a9cf004db287d4fc10594e5 (help-argument-name): Reintroduce face. (help-default-arg-highlight): Use it, now that `face-differs-from-default-p' can be trusted. diff -r 3146bd943af1 -r b917393b9c8c lisp/help-fns.el --- a/lisp/help-fns.el Fri Jun 04 22:50:04 2004 +0000 +++ b/lisp/help-fns.el Fri Jun 04 23:25:00 2004 +0000 @@ -237,14 +237,19 @@ (concat "src/" file) file))))) +;;;###autoload +(defface help-argument-name '((((supports :slant italic)) :inherit italic)) + "Face to highlight argument names in *Help* buffers.") + (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))) +It returns ARG in face `help-argument-name'; ARG is also +downcased if it displays differently than the default +face (according to `face-differs-from-default-p')." + (propertize (if (face-differs-from-default-p 'help-argument-name) + (downcase arg) + arg) + 'face 'help-argument-name)) (defun help-do-arg-highlight (doc args) (with-syntax-table (make-syntax-table emacs-lisp-mode-syntax-table)