From: Dmitry Gutov Date: Mon, 4 May 2015 23:58:02 +0000 (+0300) Subject: Highlight both type and symbol name X-Git-Tag: emacs-25.0.90~2213 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f773a4dd216e408257a358ca7c0c3f9b49baa7a0;p=emacs.git Highlight both type and symbol name * lisp/progmodes/elisp-mode.el (elisp--xref-find-definitions): Highlight both type and symbol name. --- 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)))