[ESS] rewire C-RET to M-RET
Andreas Leha
andreas.leha at med.uni-goettingen.de
Thu Nov 7 00:02:34 CET 2013
Hi Vitalie,
thanks for looking into this!
Vitalie Spinu <spinuvit at gmail.com> writes:
> >>> Andreas Leha on Wed, 6 Nov 2013 23:17:23 +0100 wrote:
> VS> [...]
>
> >> Note that in 'emacs -nw', if I run
> >> M-x local-set-key M-RET ess-eval-region-or-line-and-step
> >> it works.
>
> VS> If you do
>
> VS> M-: (define-key ess-mode-map [(meta return)] 'ess-eval-region-or-line-and-step)
>
> VS> does it work?
>
> I checked it myself ... it doesn't.
>
> Use
>
> (define-key ess-mode-map (kbd "M-RET") 'ess-eval-region-or-line-and-step)
>
I did put that into my .emacs:
--8<---------------cut here---------------start------------->8---
(eval-after-load "ess-mode"
'(progn
(define-key ess-mode-map (kbd "C-RET") 'ess-use-this-dir)
(define-key ess-mode-map (kbd "M-RET") 'ess-eval-region-or-line-and-step)
))
--8<---------------cut here---------------end--------------->8---
But now M-RET executes ess-use-this-dir both in 'emacs' and in
'emacs -nw'.
Regards,
Andreas
More information about the ESS-help
mailing list