Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop emacs from replacing underbar with <- in ess-mode

Tags:

emacs

r

ess

ess-mode is "Emacs speaks statistics." This mode is useful for editing programs for R or Splus (two separate statistics packages).

In my buffer, when ever I type _ the character is replaced with <-, which is very frustrating. Is there an emacs lisp statement to turn off this behavior?

emacs: 22.1.1 ess-mode release (unknown)

like image 660
Setjmp Avatar asked Mar 27 '10 23:03

Setjmp


1 Answers

From ESS's manual (look under "Changes/New Features in 5.2.0"):

ESS[S]: Pressing underscore ("_") once inserts " <- " (as before); pressing underscore twice inserts a literal underscore. To stop this smart behaviour, add "(ess-toggle-underscore nil)" to your .emacs after ess-site has been loaded

like image 81
Michał Marczyk Avatar answered Oct 13 '22 06:10

Michał Marczyk