unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#7582: whitespace.el: whitespace-cleanup does not clean spaces before tabs
@ 2010-12-07 17:34 Jeff Dairiki
  2010-12-08 19:35 ` Vinicius Jose Latorre
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Dairiki @ 2010-12-07 17:34 UTC (permalink / raw)
  To: 7582; +Cc: Vinicius Jose Latorre


`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





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#7582: whitespace.el: whitespace-cleanup does not clean spaces before tabs
  2010-12-07 17:34 bug#7582: whitespace.el: whitespace-cleanup does not clean spaces before tabs Jeff Dairiki
@ 2010-12-08 19:35 ` Vinicius Jose Latorre
  0 siblings, 0 replies; 2+ messages in thread
From: Vinicius Jose Latorre @ 2010-12-08 19:35 UTC (permalink / raw)
  To: Jeff Dairiki; +Cc: 7582


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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-08 19:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-07 17:34 bug#7582: whitespace.el: whitespace-cleanup does not clean spaces before tabs Jeff Dairiki
2010-12-08 19:35 ` Vinicius Jose Latorre

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).