aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2004-05-13 01:18:00 +0000
committerJuanma Barranquero2004-05-13 01:18:00 +0000
commitaae424b96f6957c6c70ef5b53d327a0db88aacfd (patch)
treec62a13403033bb1506d89b67e10d7a006be8e426
parent876e266514ab494bebbcc607787798a17ee48025 (diff)
downloademacs-aae424b96f6957c6c70ef5b53d327a0db88aacfd.tar.gz
emacs-aae424b96f6957c6c70ef5b53d327a0db88aacfd.zip
(help-arg-highlighting-function, help-argument-name): Delete.
(help-default-arg-highlight): New function. (help-do-arg-highlighting): Use it.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/help-fns.el20
2 files changed, 16 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 74c6984c682..a03b43cfad6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12004-05-13 Juanma Barranquero <lektu@terra.es>
2
3 * help-fns.el (help-arg-highlighting-function)
4 (help-argument-name): Delete.
5 (help-default-arg-highlight): New function.
6 (help-do-arg-highlighting): Use it.
7
12004-05-13 Glenn Morris <gmorris@ast.cam.ac.uk> 82004-05-13 Glenn Morris <gmorris@ast.cam.ac.uk>
2 9
3 * calendar/appt.el (appt-disp-window): Use 10 * calendar/appt.el (appt-disp-window): Use
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index e006a7f4714..e0692119a21 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -237,16 +237,14 @@ KIND should be `var' for a variable or `subr' for a subroutine."
237 (concat "src/" file) 237 (concat "src/" file)
238 file))))) 238 file)))))
239 239
240(defface help-argument-name '((t (:slant italic))) 240(defun help-default-arg-highlight (arg)
241 "Face to highlight function arguments in *Help* buffers. 241 "Default function to highlight arguments in *Help* buffers.
242You can customize this face. For more extensive customization, 242It returns ARG in lowercase italics, if the display supports it;
243see variable `help-arg-highlighting-function'.") 243else ARG is returned in uppercase normal."
244 244 (let ((attrs '(:slant italic)))
245(defvar help-arg-highlighting-function 245 (if (display-supports-face-attributes-p attrs)
246 #'(lambda (arg) (propertize (downcase arg) 'face 'help-argument-name)) 246 (propertize (downcase arg) 'face attrs)
247 "Function to call to highlight function arguments in *Help* buffers. 247 arg)))
248The function receives the argument to highlight, as a string.
249It must return the string with the desired highlighting (properties).")
250 248
251(defun help-do-arg-highlight (doc args) 249(defun help-do-arg-highlight (doc args)
252 (with-syntax-table (make-syntax-table emacs-lisp-mode-syntax-table) 250 (with-syntax-table (make-syntax-table emacs-lisp-mode-syntax-table)
@@ -264,7 +262,7 @@ It must return the string with the desired highlighting (properties).")
264 "\\(?:es\\|s\\|th\\)?" ; for ARGth, ARGs 262 "\\(?:es\\|s\\|th\\)?" ; for ARGth, ARGs
265 "\\(?:-[a-z-]+\\)?" ; for ARG-xxx 263 "\\(?:-[a-z-]+\\)?" ; for ARG-xxx
266 "\\>") ; end of word 264 "\\>") ; end of word
267 (funcall help-arg-highlighting-function arg) 265 (help-default-arg-highlight arg)
268 doc t t 1)))) 266 doc t t 1))))
269 doc)) 267 doc))
270 268