all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Marcin Borkowski <mbork@wmi.amu.edu.pl>
To: Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: Re: How to write the "interactive" form for a command acting on a region
Date: Wed, 14 Jan 2015 00:35:31 +0100	[thread overview]
Message-ID: <871tmy5k58.fsf@wmi.amu.edu.pl> (raw)
In-Reply-To: <87sifei7sf.fsf@yahoo.fr>


On 2015-01-14, at 00:24, Nicolas Richard <theonewiththeevillook@yahoo.fr> wrote:

> Hello,
>
>
> Marcin Borkowski <mbork@wmi.amu.edu.pl> writes:
>>    (if (use-region-p)
>>        (list (region-beginning) (region-end) t) (list (point-min)
>>      (point-max) t)))
>
> You could do (if (use-region-p)
>     (list (region-beginning) (region-end) t) (list nil nil t))
>
> (naive suggestion -- I have no experience !)

Ah, this looks nice!  Seems a bit artificial, but defers the binding of
the default values to the one and only one place, and hence avoids
duplication.  Thanks, I like it!

Best,

-- 
Marcin Borkowski               This email was proudly sent
http://mbork.pl                from my Emacs.



  reply	other threads:[~2015-01-13 23:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-13 22:05 How to write the "interactive" form for a command acting on a region Marcin Borkowski
2015-01-13 23:24 ` Nicolas Richard
2015-01-13 23:35   ` Marcin Borkowski [this message]
     [not found] <mailman.17860.1421186716.1147.help-gnu-emacs@gnu.org>
2015-01-13 22:38 ` Pascal J. Bourguignon
2015-01-13 23:06   ` Marcin Borkowski
     [not found]   ` <mailman.17861.1421190402.1147.help-gnu-emacs@gnu.org>
2015-01-14  2:04     ` Pascal J. Bourguignon
2015-01-14  3:49       ` Drew Adams

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871tmy5k58.fsf@wmi.amu.edu.pl \
    --to=mbork@wmi.amu.edu.pl \
    --cc=help-gnu-emacs@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.