Binding RET to newline in Emacs -


in emacs, while major mode ess[s] (emacs speaks statistics) in effect, ret automatically bound newline-and-ident prefer bound newline. following advice here, bound ret newline. works editing while in ess, has undesired effect of affecting commands in mini-buffer. cannot use ret finish commands in mini-buffer; instead, inserts new line mini-buffer rather executing command.

is there way bind key in minor mode, have not affect mini-buffer whatsoever?

even turning minor-mode off doesn't seem work , cumbersome switch minor mode on , off if did.

this relevant part of .emacs file:

(defvar my-keys-minor-mode-map (make-keymap) "my-keys-minor-mode keymap.")  (define-key my-keys-minor-mode-map (kbd "ret") 'newline)  (define-minor-mode my-keys-minor-mode   "a minor mode key settings override annoying major modes."   t " my-keys" 'my-keys-minor-mode-map)  (my-keys-minor-mode 1) 

you have answer in question:

(define-key ess-mode-map (kbd "ret") 'newline) 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -