summaryrefslogtreecommitdiff
path: root/hmouse-sh.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2017-12-12 23:34:46 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2017-12-12 23:34:46 -0500
commit98a5ecb3bf80f2b53523c769459d1a1a49491125 (patch)
treea98ea1d490561c08623866b2760dee6584159969 /hmouse-sh.el
parent78848ae0a44b417507c4cb44dc2dc4c1a87ffc56 (diff)
parent751121f50deadec04bda2261919187fc4f8779e7 (diff)
Merge from hyperbole/master
Diffstat (limited to 'hmouse-sh.el')
-rw-r--r--hmouse-sh.el15
1 files changed, 13 insertions, 2 deletions
diff --git a/hmouse-sh.el b/hmouse-sh.el
index ac3cfc6..5fac593 100644
--- a/hmouse-sh.el
+++ b/hmouse-sh.el
@@ -468,7 +468,12 @@ point determined by `mouse-select-region-move-to-beginning'."
(hmouse-bind-shifted-key-emacs 2 #'assist-key-depress-emacs #'assist-mouse-key-emacs))
;; X, macOS or MS Windows
(hmouse-bind-shifted-key-emacs 2 #'action-key-depress-emacs #'action-mouse-key-emacs)
- (hmouse-bind-shifted-key-emacs 3 #'assist-key-depress-emacs #'assist-mouse-key-emacs)))
+ (hmouse-bind-shifted-key-emacs 3 #'assist-key-depress-emacs #'assist-mouse-key-emacs)
+ (with-eval-after-load "company"
+ (define-key company-active-map [S-down-mouse-2] 'ignore)
+ (define-key company-active-map [S-mouse-2] 'smart-company-to-definition)
+ (define-key company-active-map [S-down-mouse-3] 'ignore)
+ (define-key company-active-map [S-mouse-3] 'smart-company-help))))
;;
;; XEmacs
((featurep 'xemacs)
@@ -522,7 +527,13 @@ With optional MIDDLE-KEY-ONLY-FLAG non-nil, binds only the middle mouse key."
;; X, macOS or MS Windows
(hmouse-bind-key-emacs 2 #'action-key-depress-emacs #'action-mouse-key-emacs)
(unless middle-key-only-flag
- (hmouse-bind-key-emacs 3 #'assist-key-depress-emacs #'assist-mouse-key-emacs))))
+ (hmouse-bind-key-emacs 3 #'assist-key-depress-emacs #'assist-mouse-key-emacs))
+ `(with-eval-after-load "company"
+ (define-key company-active-map [down-mouse-2] 'ignore)
+ (define-key company-active-map [mouse-2] 'smart-company-to-definition)
+ (unless ,middle-key-only-flag
+ (define-key company-active-map [down-mouse-3] 'ignore)
+ (define-key company-active-map [mouse-3] 'smart-company-help)))))
;;
;; XEmacs
((featurep 'xemacs)