[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [unicode-2] whitespace-auto-cleanup always replaces leading spaces w
From: |
Miles Bader |
Subject: |
Re: [unicode-2] whitespace-auto-cleanup always replaces leading spaces with tabs |
Date: |
Mon, 09 Apr 2007 12:58:58 +0900 |
martin rudalics <address@hidden> writes:
> > I am of the mind that having indent-tabs-mode set to nil should be
> > sufficient to disable this behavior.
>
> This should be handled by
>
> (defcustom whitespace-check-indent-whitespace indent-tabs-mode
> "Flag to check indentation whitespace. This is the global for the system.
That fails to do the right thing if the user changes indent-tabs-mode
mode after whitespace.el is loaded -- which is certainly not unlikely,
especially given that indent-tabs-mode is automatically buffer local,
and traditionally set on a per-buffer basis!
In general, using another variable as the initial value in a
defvar/defcustom is almost never the right thing for exactly this
reason.
The right thing to do with whitespace.el is probably support a special `auto'
value for such settings. For instance, in `whitespace-cleanup-internal',
instead of just checking the value of `whitespace-check-buffer-indent' (the
"local" version of `whitespace-check-indent-whitespace'), it could do
something like:
(if (eq whitespace-check-buffer-indent 'auto)
indent-tabs-mode
whitespace-check-buffer-indent)
[Incidentally, whitespace.el seems absurdly overspeced in many ways --
is it really necessary to have separate names for the global and local
versions of every config variable, and a toggle function for just about
every whitespace option?!?]
-Miles
--
My books focus on timeless truths. -- Donald Knuth
- [unicode-2] whitespace-auto-cleanup always replaces leading spaces with tabs, Braden McDaniel, 2007/04/06
- Re: [unicode-2] whitespace-auto-cleanup always replaces leading spaces with tabs, martin rudalics, 2007/04/07
- Re: [unicode-2] whitespace-auto-cleanup always replaces leading spaces with tabs,
Miles Bader <=
- Re: [unicode-2] whitespace-auto-cleanup always replaces leading spaces with tabs, martin rudalics, 2007/04/09
- Re: [unicode-2] whitespace-auto-cleanup always replaces leading spaces with tabs, Braden McDaniel, 2007/04/11
- Re: [unicode-2] whitespace-auto-cleanup always replaces leading spaces with tabs, martin rudalics, 2007/04/11
- Re: [unicode-2] whitespace-auto-cleanup always replaces leading spaces with tabs, Braden McDaniel, 2007/04/21
- Re: [unicode-2] whitespace-auto-cleanup always replaces leading spaces with tabs, martin rudalics, 2007/04/22
- Re: [unicode-2] whitespace-auto-cleanup always replaces leading spaces with tabs, Braden McDaniel, 2007/04/23
- Re: [unicode-2] whitespace-auto-cleanup always replaces leading spaces with tabs, martin rudalics, 2007/04/24