From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Gian Fontanilla <prvteprts@yahoo.com>
Cc: emacs-devel@gnu.org
Subject: Re: Patch for delete-indentation in simple.el
Date: Fri, 23 Aug 2013 11:50:29 -0400 [thread overview]
Message-ID: <jwv1u5k9zzo.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <1377264671.59291.YahooMailBasic@web163405.mail.gq1.yahoo.com> (Gian Fontanilla's message of "Fri, 23 Aug 2013 06:31:11 -0700 (PDT)")
> 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
next prev parent reply other threads:[~2013-08-23 15:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-22 8:59 Patch for delete-indentation in simple.el Gian Fontanilla
2013-08-22 21:03 ` Stefan Monnier
2013-08-23 13:31 ` Gian Fontanilla
2013-08-23 15:50 ` Stefan Monnier [this message]
2013-08-23 16:16 ` Josh
-- strict thread matches above, loose matches on Subject: below --
2013-08-24 3:27 Gian Fontanilla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv1u5k9zzo.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=prvteprts@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).