|
From: | Andreas Röhler |
Subject: | Re: (interactive "r") and (use-region-p) |
Date: | Fri, 17 Mar 2017 09:16:32 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Icedove/45.6.0 |
On 16.03.2017 19:31, Ingo Lohmar wrote:
On Thu, Mar 16 2017 13:20 (-0400), Sam Steingold wrote:--8<---------------cut here---------------start------------->8--- (defun my-command (beg end) (interactive "r") (if (use-region-p) (my-command-region beg end) (my-command-non-region))) --8<---------------cut here---------------end--------------->8---Hi Sam, AFAIK, you cannot use the (interactive "r") form for this "dwim-ish" kind of behavior. Why that? If a region is set, why should (use-region-p) fail? The answer is: there are contradictions in implementation. Which was discussed at time. Thanks Sam for showing that. |
[Prev in Thread] | Current Thread | [Next in Thread] |