I am unable to change key binding in a minor mode.
Initiation of minor mode:
(add-hook 'julia-mode-hook 'julia-repl-mode)
I tried a view variations for the key binding:
(add-hook 'julia-repl-mode
(lambda ()
(define-key map [C-shift-return] 'julia-repl-send-line)
(define-key map [C-return] 'julia-repl-send-region-or-line)))
or:
(eval-after-load 'julia-repl '(define-key julia-repl-map [C-return]
'julia-repl-send-region-or-line))
But finally without result. I want to bind the command julia-repl-send-region-or-line
to C-<eturn>
.
I was at least able to change it interactively with M-x local-set-key
. But I would like to define it in my init file.
What am I missing?
julia-repl-mode
gets turned on whenjulia-mode
is turned on. If so, you can remove the firstadd-hook
from your question.