emacs-devel
[Top][All Lists]
Advanced

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

Re: fixup-whitespace for scripts with no inter-word space


From: Eric Abrahamsen
Subject: Re: fixup-whitespace for scripts with no inter-word space
Date: Wed, 06 Nov 2013 11:55:09 +0800
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> Would it be acceptable to patch fixup-whitespace so that it does what
>> fill-delete-newlines does? Ie, rewrite as such:
>
> Sounds good, yes.  It should also insert 2 spaces after a full-stop,
> according to sentence-end-double-space, while you're at it.

Okay, but it seems like this is starting to encroach on fill territory.
In fact, the more I messed with it, the more I felt like I was
replicating `fill-delete-newlines'.

There's probably an obvious reason why this a bad idea, but it seems
like `fill-delete-newlines' already does everything that
`delete-indentation' ought to do. It handles sentence ends and multibyte
characters, and calls `canonically-space-region'.

The only additional thing `delete-indentation' does is kill the
fill-prefix, if there is one.

I'm probably getting over-enthusiastic, but doesn't it seem like
`delete-indentation' could just delete the fill-prefix and then call
`fill-delete-newlines' on the appropriate region?

Eric




reply via email to

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