From: Mohsin Kaleem Date: Mon, 29 Mar 2021 21:17:07 +0000 (+0100) Subject: Highlight relevant part of xref hits using xref-match face X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~147 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=355f1b5f49cc091ce48a50e534853225f375936a;p=emacs.git Highlight relevant part of xref hits using xref-match face Also close https://github.com/joaotavora/eglot/issues/657. (eglot--xref-make-match): Use face 'xref-match instead of 'highlight. GitHub-reference: fix https://github.com/joaotavora/eglot/issues/650 --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 59804da9e4d..57c065273b7 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -2020,7 +2020,7 @@ Try to visit the target file for a richer summary line." (substring (buffer-substring bol (point-at-eol))) (hi-beg (- beg bol)) (hi-end (- (min (point-at-eol) end) bol))) - (add-face-text-property hi-beg hi-end 'highlight + (add-face-text-property hi-beg hi-end 'xref-match t substring) (list substring (1+ (current-line)) (eglot-current-column) (- end beg))))))