[slime-devel] binding slime-complete-symbol elsewhere

Helmut Eller heller at common-lisp.net
Sun Jan 30 17:43:06 UTC 2011


* C. Hever [2011-01-30 12:50] writes:

> I want to bind C-c C-t to 'slime-complete-symbol in *inferior-lisp*. I don't
> know which hook I should use to add (lambda () (local-set-key (kbd "C-c C-t")
> 'slime-complete-symbol)) or whatever else it is I need to do to get it to
> work. Any ideas?

Usually *inferior-lisp* is in comint-mode.  comint-mode-hook would
probably work but it's problematic because comint-mode is also used by
shell-mode and gud-mode etc.  Also note that local-set-key defines a key
in the currently active keymap, which for comint-mode is comint-mode-map
but of course the comint-mode-map is shared in all buffers with
comint-mode.  You could achieve the same with something like

(define-key comint-mode-map ...)

Alternatively you can use modes like inf-lisp or inferior-slime which
have have their own keymaps (and problems).  I use the latter.

Helmut





More information about the slime-devel mailing list