help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: whitespace-cleanup + untabify?


From: address@hidden
Subject: Re: whitespace-cleanup + untabify?
Date: Sat, 14 Jun 2008 08:10:29 -0700 (PDT)
User-agent: G2/1.0

On Jun 14, 5:02 pm, Rupert Swarbrick <address@hidden> wrote:
> "address@hidden" <address@hidden> writes:
> > Dear all:
>
> > I'm a no tab person. I would like my whitespace-cleanup command to
> > also perform an untabify. How can this be done? I haven't found any
> > option that connects untabify and whitespace-cleanup. I'm using:
>
> > GNU Emacs 23.0.60.1 (i486-pc-linux-gnu, GTK+ Version 2.12.9)
>
> > I would really appreciate the help.
>
> > Regards,
> > diego.
>
> I hope I've understood the problem correctly: it seems you want a
> command to run whitespace-cleanup and untabify on the current
> buffer. As far as I know such a command doesn't exist...
>
> (defun both-cleanups ()
>   (interactive)
>   (untabify (point-min) (point-max))
>   (whitespace-cleanup))
>
> ... well, it does now!
>
> I must admit I've never used whitespace-cleanup before, and can't get
> it to do anything! But that applies to calling it manually too, so I
> presume this will work ok for you.
>
> You probably want to give it a better name and/or a keybinding.
>
> Rupert

Really thanks, Rupert, that was it.

I thought you could configure whitespace cleanup command (that is, the
Whitespace group of Emacs) so that you could decide either if several
spaces were converted to a tab (depending on the default tab size or
the one defined locally for the buffer) or just all the tabs and
spaces were converted to just spaces.

Thanks again, I'll try this.

diego.


reply via email to

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