[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master f773a4d 2/2: Highlight both type and symbol name
From: |
Dmitry Gutov |
Subject: |
[Emacs-diffs] master f773a4d 2/2: Highlight both type and symbol name |
Date: |
Tue, 05 May 2015 00:00:55 +0000 |
branch: master
commit f773a4dd216e408257a358ca7c0c3f9b49baa7a0
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
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 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 18da076..9a37722 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)))