[OS X Emacs] word wrap in latex mode

David Reitter david.reitter at gmail.com
Mon Nov 19 09:47:42 EST 2012


On Nov 19, 2012, at 8:56 AM, Robert Primmer <robert.primmer at gmail.com> wrote:
>     (add-hook 'latex-mode-hook 'turn-on-word-wrap)  

Yes, but you're not turning off other wrapping/truncating.

>     (add-hook 'latex-mode-hook
>         (defun turn-on-word-wrap () (setq word-wrap t)))

Will work with very old Emacsen.

>     (add-hook 'latex-mode-hook
>        (defun auto-word-wrap-default-function () (setq turn-on-word-wrap t)))

`turn-on-word-wrap' is not a variable.  This can't possibly work.

Try this:

(add-hook 'latex-mode-hook 'set-word-wrap) 

(You can find out the right function name by typing C-h k, then selecting the menu entry you want.)

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!

More information about the MacOSX-Emacs mailing list