emacs-devel
[Top][All Lists]
Advanced

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

Re: whitespace-cleanup from /etc/TODO


From: Yoni Rabkin Katzenell
Subject: Re: whitespace-cleanup from /etc/TODO
Date: Mon, 14 Aug 2006 11:04:06 +0300
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

Adrian Aichner <address@hidden> writes:

> Yoni Rabkin Katzenell <address@hidden> writes:
>
>> The following trivial patch will print an appropriate message when
>> `whitespace-cleanup' is run on a region, otherwise it will print that
>> `whitespace-cleanup' has run on the entire buffer.
>>
>> diff -c /home/yrk/devel/sandbox/emacs-hacking/whitespace-original.el 
>> /home/yrk/devel/sandbox/emacs-hacking/whitespace.el
>> *** /home/yrk/devel/sandbox/emacs-hacking/whitespace-original.el     
>> 2006-08-13 21:23:58.542642560 +0300
>> --- /home/yrk/devel/sandbox/emacs-hacking/whitespace.el      2006-08-13 
>> 21:12:38.085087832 +0300
>> ***************
>> --- 575,586 ----
>>      ;; Call this recursively till everything is taken care of
>>      (if whitespace-any
>>          (whitespace-cleanup-internal)
>> +      ;; if we are done, talk to the user
>>        (progn
>> !        (unless whitespace-silent
>> !          (if whitespace-region-only
>> !              (message "The region is now clean")
>
> I suggest to retain the buffer-file-name argument in the case above.
>
> Otherwise you're trading an old piece of valuable information against
> a new (perhaps less important) one.

But the case above does not describe an entire-buffer operation. The
case above is only when `whitespace-clean' has been called on a region
within the buffer.

> Adrian
>
>> !            (message "%s is now clean" buffer-file-name)))
>>          (whitespace-update-modeline)))
>>      (setq tab-width whitespace-tabwith-saved))))

It does not make sense to me to tell the user that the entire file has
been cleaned when only a region of it has been cleaned. So I might be
misunderstanding your point.

-- 
   "Cut your own wood and it will warm you twice"





reply via email to

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