emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 940bb6e 3/4: Fontify the group and the line number


From: Dmitry Gutov
Subject: master 940bb6e 3/4: Fontify the group and the line number
Date: Fri, 4 Dec 2020 20:02:09 -0500 (EST)

branch: master
commit 940bb6e984e80a933af80984556bebb31d2cdfd3
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    Fontify the group and the line number
    
    * lisp/progmodes/xref.el (xref--show-defs-minibuffer):
    Fontify the group and the line number.
---
 lisp/progmodes/xref.el | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index e304a7b..a78fed2 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -951,8 +951,15 @@ local keymap that binds `RET' to 
`xref-quit-and-goto-xref'."
                (cl-loop for (xref . more2) on xrefs do
                         (with-slots (summary location) xref
                           (let* ((line (xref-location-line location))
-                                 (line-fmt (if line (format "%s:" line) ""))
-                                 (group-fmt (substring group 
group-prefix-length))
+                                 (line-fmt
+                                  (if line
+                                      (format #("%d:" 0 2 (face 
xref-line-number))
+                                              line)
+                                    ""))
+                                 (group-fmt
+                                  (propertize
+                                   (substring group group-prefix-length)
+                                   'face 'xref-file-header))
                                  (candidate
                                   (if show-summary
                                       (format "%s:%s%s" group-fmt line-fmt 
summary)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]