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

Setjmp picture Setjmp · Mar 28, 2010 · Viewed 9.8k times · Source

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)

Answer

Michał Marczyk picture Michał Marczyk · Mar 28, 2010

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