2

I want to be able to jump to definition with control left click when editing c++ code. I tried

(define-key c++-mode-map [C-mouse-1] 'rtags-find-symbol-at-point)

This does not seem to work because emacs (24.5.1) already define a global behavior for C-mouse-1 (buffer navigation in graphical mode). The contextual window opens, but rtags-find-symbol-at-point is not called. Any way to make this work ?

2

Try:

(define-key c++-mode-map [C-down-mouse-1] 'rtags-find-symbol-at-point)
  • 1
    If you do f1 k then hold control and click it tells you that you pressed C-down-mouse-1, so this is probably what you should bind. – dshepherd May 25 '16 at 11:20
  • @dshepherd what is f1 k? – sid-kap Dec 20 '16 at 17:29
  • @sid-kap I meant press the F1 key, then press the k key. – dshepherd Dec 20 '16 at 18:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.