unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Adrian Aichner <adrian@xemacs.org>
Subject: Re: whitespace-cleanup from /etc/TODO
Date: Mon, 14 Aug 2006 07:43:59 +0200	[thread overview]
Message-ID: <4pwf50tc.fsf@mx.qsc.de> (raw)
In-Reply-To: 87zme8tqxx.fsf@actcom.com

Yoni Rabkin Katzenell <yoni-r@actcom.com> 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.

Adrian

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

-- 
Adrian Aichner
 mailto:adrian@xemacs.org
 http://www.xemacs.org/

  reply	other threads:[~2006-08-14  5:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-13 18:45 whitespace-cleanup from /etc/TODO Yoni Rabkin Katzenell
2006-08-14  5:43 ` Adrian Aichner [this message]
2006-08-14  8:04   ` Yoni Rabkin Katzenell
2006-08-14 22:53 ` Stuart D. Herring
2006-08-16 10:51   ` Yoni Rabkin Katzenell

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=4pwf50tc.fsf@mx.qsc.de \
    --to=adrian@xemacs.org \
    /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 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).