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.