[OS X Emacs] Soft word wrap

David Reitter david.reitter at gmail.com
Sat Aug 1 07:13:41 EDT 2009

On Jul 29, 2009, at 6:20 PM, Enrico Franconi wrote:

> This thing is driving me crazy :-(
> It does not work for me in Aquamacs\Cocoa but it does work in carbon  
> Aquamacs. The settings are the same.

See below for an explanation of why I think this is happening.  I  
think it's bad design and I hope something can be done about that.

http://aquamacs.org -- Aquamacs: Emacs on Mac OS X
http://aquamacs.org/donate -- Could we help you? Return the favor and  
support the Aquamacs Project!

Begin forwarded message:

> From: David Reitter <david.reitter at gmail.com>
> Date: August 1, 2009 1:01:06 PM GMT+02:00
> To: Emacs Development <emacs-devel at gnu.org>
> Subject: globalized minor modes and major mode hooks
> Here's something that came up on the Emacs on OS X mailing list in  
> conjunction with an Aquamacs preview based on 23.1.
> A user wanted to know how to turn off word wrapping just for latex.   
> Translated to GNU Emacs 23.1, this would be:
> (add-hook 'latex-mode-hook
> 	  (defun turn-off-word-wrap () (setq word-wrap nil)))
> As a normal setting, we also have:
> (global-visual-line-mode 1)
> Now, switching to LaTeX mode:
> (latex-mode)
> What should the value of word-wrap be?
> I expected that the specific, local mode-hook setting would override  
> any global defaults defined by global-visual-line-mode. However,  
> this is not the case.  word-wrap is t.
> Two questions:
> 1. What is a good route for a user without intimate knowledge of  
> Emacs internals (specifically without knowing how global-visual-line- 
> mode does its job) to debug this?
> 2. I suspect that the define-globalized-minor-mode macro is at  
> fault, because the minor mode code is executed first (run-mode- 
> hooks) before the minor mode is configured.    If this is true, can  
> this be changed?
> If not, how are users supposed to set something like word-wrap for a  
> major mode when the global mode is enabled?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2193 bytes
Desc: not available
URL: <http://email.esm.psu.edu/pipermail/macosx-emacs/attachments/20090801/84f0cddd/attachment.p7s>

More information about the MacOSX-Emacs mailing list