emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 23.0.60; whitespace.el mishap


From: Vinicius Jose Latorre
Subject: Re: 23.0.60; whitespace.el mishap
Date: Sat, 16 Feb 2008 00:32:12 -0300
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.12) Gecko/20080201 SeaMonkey/1.1.8


Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

Given the c buffer:

int main()
{
    if (1) {
        x = foo;
    }
    return 0;
}


`M-x whitespace-cleanup' will result in:

int main()
{
    if (1) {
        x= foo;
    }
    return 0;
}

This is because `whitespace-indentation-regexp' includes a trailing
"[^\n\t]", which matches the x.  After `re-search-forward' of
`whitespace-cleanup-region' the point is now after the `x'.  In order
for the subsequent `delete-horizontal-space' to work, a (forward-char -1) should probably be done, before the
`current-indentation' call.

Yes, I can reproduce the problem and I'll send a fix sooner.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]