# HG changeset patch # User Juanma Barranquero # Date 1253819981 0 # Node ID 22328c89c07162f821c3dc5573e18ba05fb07fdb # Parent e7e9efa5ce163bc0d8c9bece5fa7b054fa4ef4e3 * help-fns.el (help-downcase-arguments): New option, defaulting to nil. (help-default-arg-highlight): Remove. (help-highlight-arg): New function. (help-do-arg-highlight): Use it. Suggested by Drew Adams . (Bug#4510, bug#4520) * NEWS: Mention new variable `help-downcase-arguments' and new default for arguments in *Help* buffers. diff -r e7e9efa5ce16 -r 22328c89c071 etc/ChangeLog --- a/etc/ChangeLog Thu Sep 24 18:10:44 2009 +0000 +++ b/etc/ChangeLog Thu Sep 24 19:19:41 2009 +0000 @@ -1,3 +1,8 @@ +2009-09-22 Juanma Barranquero + + * NEWS: Mention new variable `help-downcase-arguments' + and new default for arguments in *Help* buffers. + 2009-09-15 Juanma Barranquero * NEWS: Mention new behavior of -Q and new variable diff -r e7e9efa5ce16 -r 22328c89c071 etc/NEWS --- a/etc/NEWS Thu Sep 24 18:10:44 2009 +0000 +++ b/etc/NEWS Thu Sep 24 19:19:41 2009 +0000 @@ -47,6 +47,9 @@ * Changes in Emacs 23.2 +** Function arguments in *Help* buffers are now in uppercase by default. +You can customize the new variable `help-downcase-arguments' to change it. + ** Unibyte sessions are now considered obsolete. I.e. the use of the environment variable EMACS_UNIBYTE, or command line arguments --unibyte, --multibyte, --no-multibyte, and --no-unibyte diff -r e7e9efa5ce16 -r 22328c89c071 lisp/ChangeLog --- a/lisp/ChangeLog Thu Sep 24 18:10:44 2009 +0000 +++ b/lisp/ChangeLog Thu Sep 24 19:19:41 2009 +0000 @@ -1,3 +1,11 @@ +2009-09-24 Juanma Barranquero + + * help-fns.el (help-downcase-arguments): New option, defaulting to nil. + (help-default-arg-highlight): Remove. + (help-highlight-arg): New function. + (help-do-arg-highlight): Use it. + Suggested by Drew Adams . (Bug#4510, bug#4520) + 2009-09-24 Stefan Monnier * term.el (term-set-scroll-region, term-handle-ansi-escape): diff -r e7e9efa5ce16 -r 22328c89c071 lisp/help-fns.el --- a/lisp/help-fns.el Thu Sep 24 18:10:44 2009 +0000 +++ b/lisp/help-fns.el Thu Sep 24 19:19:41 2009 +0000 @@ -158,15 +158,18 @@ (concat "src/" file) file))))) -(defun help-default-arg-highlight (arg) - "Default function to highlight arguments in *Help* buffers. -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)) +(defcustom help-downcase-arguments nil + "If non-nil, argument names in *Help* buffers are downcased." + :type 'boolean + :group 'help + :version "23.2") + +(defun help-highlight-arg (arg) + "Highlight ARG as an argument name for a *Help* buffer. +Return ARG in face `help-argument-name'; ARG is also downcased +if the variable `help-downcase-arguments' is non-nil." + (propertize (if help-downcase-arguments (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) @@ -184,7 +187,7 @@ "\\(?:-[a-z0-9-]+\\)?" ; for ARG-xxx, ARG-n "\\(?:-[{([<`\"].*?\\)?"; for ARG-{x}, (x), , [x], `x' "\\>") ; end of word - (help-default-arg-highlight arg) + (help-highlight-arg arg) doc t t 1))))) (defun help-highlight-arguments (usage doc &rest args)