[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug#3688: Also need (auto-fill-mode nil) to trigger this bug
From: |
Kees Bakker |
Subject: |
Re: bug#3688: Also need (auto-fill-mode nil) to trigger this bug |
Date: |
Mon, 29 Jun 2009 11:18:10 +0200 |
User-agent: |
KMail/1.9.9 |
On Monday 29 June 2009, Stefan Monnier wrote:
> > BTW. I never intended to enable auto-fill. But strangly enough the following
> > will _toggle_ auto-fill-mode. (I know, this function is "Toggle Auto Fill
> > mode".
> > Besides a clear description to turn it on, it should also have a clear
> > description to turn it off.)
>
> > (auto-fill-mode nil)
>
> All minor modes are turned on with a positive arg and turned off with
> a negative arg. A nil argument may toggle it, but that might change in
> the future. A `toggle' argument toggles most (but not all) minor modes.
OK. I didn't know that (and I'm using emacs for almost two decades now). Still I
want to express my dislike about the way a "nil" arg is handled.
First, is 0 a positive arg? Some people might think so (I do). It is a bit
confusing.
(auto-fill-mode 0) will turn the mode off, so in that sense a zero is not a
positive
arg. To summarize
(auto-fill-mode) ;;; toggles
(auto-fill-mode 0) ;;; turn off
(auto-fill-mode nil) ;;; toggles
(auto-fill-mode -1) ;;; turn off
(auto-fill-mode 1) ;;; turn on
(auto-fill-mode t) ;;; turn on
Toggling for a "nil" argument does not make sense to me.
--
Kees