emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: region-active-p


From: Juri Linkov
Subject: Re: region-active-p
Date: Tue, 11 Dec 2007 11:57:59 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

>> I came up with a better solution to the question of what region-active-p
>> should do when the region is empty: make it a user option.
>> I think that will make people happy, because I expect most users will
>> have the same preference for all the commands.
>>
>> I will install it when I have a good connection.
>
> That certainly wouldn't be wrong on the logical level,
> however can't help in original case, reduces
> compatibilty rather than enhances them.
>
> My idea was to make the writing of compatible code a
> little bit easier, to get rid of one of these (featurep
> 'xemacs) forms occasionally.
>
> If you could ask Juri to install his answer we will all
> live in a better world. :)

I proposed:

(defun region-active-p ()
    (and transient-mark-mode mark-active
         (not (eq (region-beginning) (region-end)))))

And as I understand, Richard wants:

(defun region-active-p ()
    (and transient-mark-mode mark-active
         (if some-new-user-option
             (not (eq (region-beginning) (region-end))))))

This seems like a good solution.

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]