mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Fix regexp in help-do-arg-highlight
* lisp/help-fns.el (help-do-arg-highlight): Fix regexp. (Bug#65580) Avoid highlighting (parts of) the function name as arguments in the output of 'describe-function' when the function has an argument with the same name. To achieve this, refine the regular expression that 'help-do-arg-highlight' uses such that it doesn't match anything in the function name.
This commit is contained in:
parent
da8b323f82
commit
dd38097f0b
1 changed files with 2 additions and 1 deletions
|
|
@ -369,7 +369,8 @@ if the variable `help-downcase-arguments' is non-nil."
|
|||
(setq doc (replace-regexp-in-string
|
||||
;; This is heuristic, but covers all common cases
|
||||
;; except ARG1-ARG2
|
||||
(concat "\\<" ; beginning of word
|
||||
(concat "([^ ]+ .*" ; skip function name
|
||||
"\\<" ; beginning of word
|
||||
"\\(?:[a-z-]*-\\)?" ; for xxx-ARG
|
||||
"\\("
|
||||
(regexp-quote arg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue