[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master dd38097f0b9: Fix regexp in help-do-arg-highlight
From: |
Stefan Kangas |
Subject: |
master dd38097f0b9: Fix regexp in help-do-arg-highlight |
Date: |
Fri, 1 Sep 2023 14:32:38 -0400 (EDT) |
branch: master
commit dd38097f0b9458eea882043fa06b27248e505b22
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
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.
---
lisp/help-fns.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 609bed18f2f..b34778773a9 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master dd38097f0b9: Fix regexp in help-do-arg-highlight,
Stefan Kangas <=