aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorDmitry Gutov2015-05-05 02:58:02 +0300
committerDmitry Gutov2015-05-05 02:59:34 +0300
commitf773a4dd216e408257a358ca7c0c3f9b49baa7a0 (patch)
treec410a7d748b3f97b12f8ab0fc86f479e9b2f840c /lisp
parent9fa69f6b14a3f13217ddbafbc120d5f8fafaca50 (diff)
downloademacs-f773a4dd216e408257a358ca7c0c3f9b49baa7a0.tar.gz
emacs-f773a4dd216e408257a358ca7c0c3f9b49baa7a0.zip
Highlight both type and symbol name
* lisp/progmodes/elisp-mode.el (elisp--xref-find-definitions): Highlight both type and symbol name.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/elisp-mode.el7
1 files 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."
625 625
626(defun elisp--xref-find-definitions (symbol) 626(defun elisp--xref-find-definitions (symbol)
627 (save-excursion 627 (save-excursion
628 (let (lst) 628 (let ((fmt "(%s %s)")
629 lst)
630 (put-text-property 1 3 'face 'font-lock-keyword-face fmt)
631 (put-text-property 4 6 'face 'font-lock-function-name-face fmt)
629 (dolist (type '(feature defface defvar defun)) 632 (dolist (type '(feature defface defvar defun))
630 (let ((loc 633 (let ((loc
631 (condition-case err 634 (condition-case err
@@ -634,7 +637,7 @@ It can be quoted, or be inside a quoted form."
634 (xref-make-bogus-location (error-message-string err)))))) 637 (xref-make-bogus-location (error-message-string err))))))
635 (when loc 638 (when loc
636 (push 639 (push
637 (xref-make (format "(%s %s)" type symbol) 640 (xref-make (format fmt type symbol)
638 loc) 641 loc)
639 lst)))) 642 lst))))
640 lst))) 643 lst)))