[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to tell if auto-fill is active?
From: |
Stefan Monnier |
Subject: |
Re: How to tell if auto-fill is active? |
Date: |
Fri, 26 Nov 2010 14:09:35 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> | I would like to test if auto-fill-mode is on, and whether to call
> | (auto-fill-mode).
> Turn it on: (auto-fill-mode 1)
> Turn it off: (auto-fill-mode 0)
> Toggle it: (auto-fill-mode)
Actually, this last one will change in Emacs-24 to "turn it on", so if
you want to toggle it reliably from Elisp, you should instead do one of:
(auto-fill-mode 'toggle) ; May fail in older Emacsen.
(call-interactively 'auto-fill-mode) ; will behave slightly differently.
(auto-fill-mode (if auto-fill-function -1 1))
-- Stefan