From f773a4dd216e408257a358ca7c0c3f9b49baa7a0 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Tue, 5 May 2015 02:58:02 +0300 Subject: [PATCH] Highlight both type and symbol name * lisp/progmodes/elisp-mode.el (elisp--xref-find-definitions): Highlight both type and symbol name. --- lisp/progmodes/elisp-mode.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 18da0762c96..9a37722165d 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -625,7 +625,10 @@ It can be quoted, or be inside a quoted form." (defun elisp--xref-find-definitions (symbol) (save-excursion - (let (lst) + (let ((fmt "(%s %s)") + lst) + (put-text-property 1 3 'face 'font-lock-keyword-face fmt) + (put-text-property 4 6 'face 'font-lock-function-name-face fmt) (dolist (type '(feature defface defvar defun)) (let ((loc (condition-case err @@ -634,7 +637,7 @@ It can be quoted, or be inside a quoted form." (xref-make-bogus-location (error-message-string err)))))) (when loc (push - (xref-make (format "(%s %s)" type symbol) + (xref-make (format fmt type symbol) loc) lst)))) lst))) -- 2.39.2