1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-25 10:47:00 +00:00

(help-argument-name): Default to bold; don't inherit from

font-lock-variable-name-face.
(help-do-arg-highlight): Grok also ARGth occurrences in the docstring.
This commit is contained in:
Juanma Barranquero 2004-05-06 01:12:06 +00:00
parent b03a4fdde7
commit 1c34b5a97d
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,9 @@
2004-05-06 Juanma Barranquero <lektu@terra.es>
* help-fns.el (help-argument-name): Default to bold; don't inherit
from font-lock-variable-name-face.
(help-do-arg-highlight): Grok also ARGth occurrences in the docstring.
* ehelp.el (electric-help-command-loop): Check whether the last
character is visible, not (point-max).

View File

@ -237,14 +237,14 @@ KIND should be `var' for a variable or `subr' for a subroutine."
(concat "src/" file)
file)))))
(defface help-argument-name '((t (:inherit font-lock-variable-name-face)))
(defface help-argument-name '((t (:weight bold)))
"Face to highlight function arguments in docstrings.")
(defun help-do-arg-highlight (doc args)
(while args
(let ((arg (prog1 (car args) (setq args (cdr args)))))
(setq doc (replace-regexp-in-string
(concat "\\<\\(" arg "\\)\\(?:es\\|s\\)?\\>")
(concat "\\<\\(" arg "\\)\\(?:es\\|s\\|th\\)?\\>")
(propertize arg 'face 'help-argument-name)
doc t t 1))))
doc)