all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jeff Dairiki <dairiki@dairiki.org>
To: 7582@debbugs.gnu.org
Cc: Vinicius Jose Latorre <viniciusjl@ig.com.br>
Subject: bug#7582: whitespace.el: whitespace-cleanup does not clean spaces before tabs
Date: Tue, 7 Dec 2010 09:34:26 -0800	[thread overview]
Message-ID: <20101207173424.GA28668@dairiki.org> (raw)


`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





             reply	other threads:[~2010-12-07 17:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-07 17:34 Jeff Dairiki [this message]
2010-12-08 19:35 ` bug#7582: whitespace.el: whitespace-cleanup does not clean spaces before tabs Vinicius Jose Latorre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101207173424.GA28668@dairiki.org \
    --to=dairiki@dairiki.org \
    --cc=7582@debbugs.gnu.org \
    --cc=viniciusjl@ig.com.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.