[OS X Emacs] How to overwrite global line-wrapping setting for a specific mode?

Marius Hofert marius.hofert at math.ethz.ch
Thu Oct 6 18:46:46 EDT 2011


On 2011-10-07, at 00:25 , David Reitter wrote:

> On Oct 6, 2011, at 6:18 PM, Marius Hofert wrote:
> > 
> > With C-h k + the menu item "truncate", I found "set-truncate-lines", so I tried:
> > (add-hook 'ess-mode-hook 'set-truncate-lines)
> > Again, .R files were opened with word(s) wrap(ped).
> 
> This seems like the right solution to me, and it works perfectly for me, both with a manually entered R-mode, as well as when .R files are loaded.
> It even says "Truncate long lines enabled" in the echo area after the mode is entered.
> 
> What's going on?

Good question. I tried (add-hook 'ess-mode-hook 'set-truncate-lines) and (add-hook 'r-mode-hook 'set-truncate-lines)

Preferences just contained these lines, nothing more. So even if "(global-visual-line-mode 1)" is missing.

> 
> _____________________________________________________________
> MacOSX-Emacs mailing list
> MacOSX-Emacs at email.esm.psu.edu
> http://email.esm.psu.edu/mailman/listinfo/macosx-emacs
> List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx





More information about the MacOSX-Emacs mailing list