GNU bug report logs -
#7582
whitespace.el: whitespace-cleanup does not clean spaces before tabs
Previous Next
Reported by: Jeff Dairiki <dairiki <at> dairiki.org>
Date: Tue, 7 Dec 2010 17:30:03 UTC
Severity: normal
Fixed in version 24.1
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 7582 <at> debbugs.gnu.org (full text, mbox):
I've just updated the BZR Emacs and EmacsWiki.
Thanks for your patch,
Vinicius
Jeff Dairiki wrote:
> `whitespace-cleanup-region' in whitespace.el (version 13.1) does not
> clean up spaces before tabs if either:
>
> - `space-before-tab' is in `whitespace-style' and `indent-tabs-mode'
> non-nil
>
> - `space-before-tab::tab' is in `whitespace-style'.
>
>
> Here's a patch (on whitespace.el version 13.1) which fixes the problem
> for me.
>
> diff --git a/site-lisp/whitespace.el b/site-lisp/whitespace.el
> index a9fec09..5f5e822 100644
> --- a/site-lisp/whitespace.el
> +++ b/site-lisp/whitespace.el
> @@ -1700,12 +1700,12 @@ documentation."
> (whitespace-replace-action
> (if whitespace-indent-tabs-mode 'tabify 'untabify)
> rstart rend whitespace-space-before-tab-regexp
> - (if whitespace-indent-tabs-mode 1 2)))
> + (if whitespace-indent-tabs-mode 0 2)))
> ;; ACTION: replace SPACEs before TAB by TABs.
> ((memq 'space-before-tab::tab whitespace-style)
> (whitespace-replace-action
> 'tabify rstart rend
> - whitespace-space-before-tab-regexp 1))
> + whitespace-space-before-tab-regexp 0))
> ;; ACTION: replace TABs by SPACEs.
> ((memq 'space-before-tab::space whitespace-style)
> (whitespace-replace-action
>
>
> Thanks for everything!
>
> Jeff
This bug report was last modified 14 years and 203 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.