Limit fontification of "customize" in setopt suggestion
* lisp/help-fns.el (help-fns--customize-variable): Limit the fontification to newly inserted text to avoid spurious fontification of other instances of the word "customize."
This commit is contained in:
parent
50531a00b5
commit
bf7bcbaa3d
1 changed files with 4 additions and 2 deletions
|
@ -1589,7 +1589,9 @@ it is displayed along with the global value."
|
|||
;; Make a link to customize if this variable can be customized.
|
||||
(when (custom-variable-p variable)
|
||||
(let ((customize-label "customize")
|
||||
(custom-set (get variable 'custom-set)))
|
||||
(custom-set (get variable 'custom-set))
|
||||
(opoint (with-current-buffer standard-output
|
||||
(point))))
|
||||
(princ (concat " You can " customize-label (or text " this variable.")))
|
||||
(when (and custom-set
|
||||
;; Don't override manually written documentation.
|
||||
|
@ -1606,7 +1608,7 @@ it is displayed along with the global value."
|
|||
"."))))
|
||||
(with-current-buffer standard-output
|
||||
(save-excursion
|
||||
(while (re-search-backward (concat "\\(" customize-label "\\)") nil t)
|
||||
(while (re-search-backward (concat "\\(" customize-label "\\)") opoint t)
|
||||
(help-xref-button 1 'help-customize-variable variable))))
|
||||
(terpri))))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue