You are not logged in.

#1 2012-12-01 05:56:45

mrpringle
Member
Registered: 2009-07-11
Posts: 74

emacs keymapping question

Hi,
I'm using ropemacs and it provides a function named rope-show-calltip which displays the definition of the function the caret is within.

What I would like to do is automatically call this function when the open bracket character is inserted, unless there is a better solution?

I guess when "(" is pressed I need to insert it first and then call rope-show-calltip after, because rope-show-calltip assumes it is inside the opening brace of a function.

Can this be done? Is there a better way?

Offline

#2 2012-12-09 11:18:41

juna
Member
Registered: 2012-04-02
Posts: 21

Re: emacs keymapping question

I don't know ropemacs, but what about something like

(defun insert-bracket-rope-calltip
  "inserts ( and calls rope-show-calltip"
  (interactive)
  (insert "(")
  (rope-show-calltip)
  )
(eval-after-load 'ropemacs-mode
  '(define-key ropemacs-local-keymap "(" 'insert-bracket-rope-calltip))

Offline

Board footer

Powered by FluxBB