summaryrefslogtreecommitdiff
path: root/lisp/help-fns.el
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2004-06-04 23:26:14 +0000
committerJuanma Barranquero <lekktu@gmail.com>2004-06-04 23:26:14 +0000
commit8be2a2dd85a1883526924a652bde209ad3b48c8b (patch)
tree59ea90bda17501bc66936b743240ed94c6a2e287 /lisp/help-fns.el
parente2cae76902373ad508c195f188d0608511eeccb7 (diff)
downloademacs-8be2a2dd85a1883526924a652bde209ad3b48c8b.tar.gz
(help-argument-name): Reintroduce face.
(help-default-arg-highlight): Use it, now that `face-differs-from-default-p' can be trusted.
Diffstat (limited to 'lisp/help-fns.el')
-rw-r--r--lisp/help-fns.el17
1 files changed, 11 insertions, 6 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index e7e09a431bd..03ea5bef653 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -237,14 +237,19 @@ KIND should be `var' for a variable or `subr' for a subroutine."
(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)