emacs-devel
[Top][All Lists]
Advanced

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

Re: Patch for delete-indentation in simple.el


From: Stefan Monnier
Subject: Re: Patch for delete-indentation in simple.el
Date: Fri, 23 Aug 2013 11:50:29 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> 1) Should I create a separate function which does `delete-indentation'
> on a region, and not change `delete-indentation' itself?

No, you can keep it within the same function.  Note that the function
will need to receive new optional arguments for BEG...END.

> 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".

I was just pointing out that it will provide another feature that's
been requested.  There are different ways to think about what this
function does.

> 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'?

Rather than check mark-active, call use-region-p.  And this call needs
to take place within the spec of (interactive <spec>), which means that
the spec will be Elisp code rather than a simple string.
E.g. the current "*P" is equivalent to

  (progn (barf-if-buffer-read-only)
         (list current-prefix-arg))


-- Stefan



reply via email to

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