emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] 06/09: Fix ggtags-highlight-tag-map to avoid 'undefined' error


From: Leo Liu
Subject: [elpa] 06/09: Fix ggtags-highlight-tag-map to avoid 'undefined' error
Date: Tue, 25 Feb 2014 08:45:58 +0000

leoliu pushed a commit to branch master
in repository elpa.

commit 36b9698edc4649a6879a1b68206a02f9f83bcc8a
Author: Leo Liu <address@hidden>
Date:   Tue Feb 25 02:48:03 2014 +0800

    Fix ggtags-highlight-tag-map to avoid 'undefined' error
    
    for example <S-mouse-1> is undefined.
---
 ggtags.el |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/ggtags.el b/ggtags.el
index 4aa1073..a58d5d6 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -1360,8 +1360,13 @@ Global and Emacs."
 
 (defvar ggtags-highlight-tag-map
   (let ((map (make-sparse-keymap)))
-    (define-key map [S-down-mouse-1] 'ggtags-find-tag-dwim)
-    (define-key map [S-down-mouse-3] 'ggtags-find-reference)
+    ;; Bind down- events so that the global keymap won't ``shine
+    ;; through''. See `mode-line-buffer-identification-keymap' for
+    ;; similar workaround.
+    (define-key map [S-mouse-1] 'ggtags-find-tag-dwim)
+    (define-key map [S-down-mouse-1] 'ignore)
+    (define-key map [S-mouse-3] 'ggtags-find-reference)
+    (define-key map [S-down-mouse-3] 'ignore)
     map)
   "Keymap used for valid tag at point.")
 
@@ -1369,7 +1374,7 @@ Global and Emacs."
 (put 'ggtags-active-tag 'keymap ggtags-highlight-tag-map)
 ;; (put 'ggtags-active-tag 'mouse-face 'match)
 (put 'ggtags-active-tag 'help-echo
-     "S-down-mouse-1 for definitions\nS-down-mouse-3 for references")
+     "S-mouse-1 for definitions\nS-mouse-3 for references")
 
 (defun ggtags-highlight-tag-at-point ()
   (when (and ggtags-mode ggtags-project-root (ggtags-find-project))



reply via email to

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