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

Marius Hofert marius.hofert at math.ethz.ch
Sun Oct 9 12:34:16 EDT 2011


Dear Piet,

I've already checked the other places and thought I had not changed anything else.
I did a fresh reinstall and had the same problem again. 

I finally found out that I used:
(add-hook 'ess-mode-hook
          (lambda ()
	    ... other settings for ess-mode
            (set-truncate-lines)
	    )
	  )
instead of:
(add-hook 'ess-mode-hook 'set-truncate-lines)

I thought I can just put in the additional setting concerning ess-mode in this "group of settings", but apparently not. Putting it in an extra line solved the issue.

Cheers,

Marius




On 2011-10-08, at 17:07 , Piet van Oostrum wrote:

> Marius Hofert <marius.hofert at math.ethz.ch> writes:
> 
>> I really don't get this. I removed everything from Preferences.el and put in:
>> 
>> (setq-default truncate-lines t)
>> 
>> This should set the default to truncated lines (which is more than
>> what I want, but let's do this for the moment). When I close and reopen
>> Aquamacs, I still get the file(s) in word-wrap. So apparently, my
>> settings in Preferences.el are ignored. I also tried "(set-default
>> 'truncate-lines t)". Again, files are opened in word wrap.
>> 
> 
> There is more than Preferences.el. There are also customizations that
> may have been set. See the Options menu, especially: Auto Word Wrap in Text Modes.
> 
> If that is set then that would explain this behaviour, I think.
> -- 
> Piet van Oostrum <piet at vanoostrum.org>
> WWW: http://pietvanoostrum.com/
> PGP key: [8DAE142BE17999C4]
> 
> _____________________________________________________________
> 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