[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch for delete-indentation in simple.el
From: |
Gian Fontanilla |
Subject: |
Re: Patch for delete-indentation in simple.el |
Date: |
Fri, 23 Aug 2013 06:31:11 -0700 (PDT) |
Just some clarifications:
1) Should I create a separate function which does `delete-indentation' on a
region, and not change `delete-indentation' itself?
2) If the answer to 1 is yes, what name should I give it? The feature I'm
proposing is semantically closer to "join lines", rather than the inverse of
`fill-region' or `fill-paragraph', so I don't think it is correct to call it
"unfill". To further explain this, I envision this to be the inverse of a
"split" function (not `split-line') , which will split the line into several
lines based on a delimiter (whitespace by default or user specified, or can
also be fill-prefix). So a line such as
one-two-three-four
when split given the delimiter (or prefix) "-", will turn into:
one
two
three
four
Then, running "join lines" on the region should get it back to the original
line, granted that the prefix is "-"; otherwise the words will be separated by
a single whitespace when prefix is nil.
3) > please use `use-region-p' and make the test from within the `interactive'
spec rather than inside the function itself
I can't say I understand this completely. This is assuming I am to change the
body of `delete-indentation'?
Regards,
Gian
--------------------------------------------
On Fri, 8/23/13, Stefan Monnier <address@hidden> wrote:
Subject: Re: Patch for delete-indentation in simple.el
To: "Gian Fontanilla" <address@hidden>
Cc: address@hidden
Date: Friday, August 23, 2013, 5:03 AM
> I'm sending this improvement for
delete-indentation in simple.el. Please see
> attached files Description, ChangeLog, and Patch.
IIUC your suggestion is to make delete-indentation work on
the region
if active. That doesn't sound bad. Of course,
another name for it
is unfill-region, which has also been requested.
Could you provide a patch which does that (but please use
`use-region-p'
and make the test from within the `interactive' spec rather
than
inside the function itself)?
Stefan
PS: Just include your own ChangeLog comment rather than the
whole
ChangeLog file.