[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to write the "interactive" form for a command acting on a region
From: |
Marcin Borkowski |
Subject: |
Re: How to write the "interactive" form for a command acting on a region |
Date: |
Wed, 14 Jan 2015 00:35:31 +0100 |
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.