[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: trouble turning off visual line mode
From: |
Xah Lee |
Subject: |
Re: trouble turning off visual line mode |
Date: |
Sun, 6 Sep 2009 22:13:42 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Sep 6, 2:55 pm, Allan Gottlieb <gottl...@nyu.edu> wrote:
> I have the following function in my .emacs
>
> ;; Want auto-fill and not visual-line-mode
> ;; Define the function here; add to hook via customize
> (defun ajg-html-visual-off-fill-on ()
> "For html, turn OFF visual-line-mode and turn-ON auto fill"
> (message "ckpt 1")
> (visual-line-mode -1)
> (message "ckpt 2")
> (auto-fill-mode 1)
> (message "ckpt 3")
> )
>
> I have it put in the html-mode-hook via
>
> (custom-set-variables
> ...
> '(html-mode-hook (quote (ajg-alter-electric-html-tag
> ajg-html-visual-off-fill-on)))
> ...
> )
>
> Yet when I visit an html file
> auto-fill-mode is turned on as expected but
> visual-line-mode is *not* turned off.
for minor modes, the convention is 1 is on and 0 is off.
i got a lesson of that recently from emacs devers too. it's in elisp
manual under the minor mode section too.
Xah