[Top][All Lists]

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

Re: reverse-region-wordwise

From: Kevin Rodgers
Subject: Re: reverse-region-wordwise
Date: Fri, 19 Sep 2003 10:17:00 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv: Gecko/20020406 Netscape6/6.2.2

Roland Winkler wrote:

Kevin Rodgers <address@hidden> writes:
Roland Winkler wrote:
Is there somewhere a function reverse-region-wordwise or do I have
to write it by myself?

I think you'll have to roll your own, but you could probably get what
you need by making just a few changes to reverse-region in sort.el.

Yes and no. I haven't decided yet which features I actually would
like to have. In particular, how should this function handle
different wordbreak characters like whitespace and newline?

Well, what are the choices?

1. Preserve the whitespace verbatim between words, so that

a b c
d e


e d
c b a

2. Preserve the shape of the paragraph, so that it becomes

f e d
c b

I think (1) would be easier to implement and makes a more sensible
default, so I'd start there.  Then you could implement (2) as an option
(e.g.  controlled by a prefix arg).

Kevin Rodgers

reply via email to

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