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: Fri, 19 Oct 2007 23:57:19 +0300
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux)

> What about to introduce `region-active-p' and/or
> `region-exists-p' for
>
> (and mark-active transient-mark-mode)

I think this is a good idea.  Instead of putting everywhere
a complex condition:

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

`region-active-p' is much shorter.

> thus enhancing portability with XEmacs, which I try
> here with such a construct:
>
> (or (and (featurep 'xemacs)
>        (region-active-p))
>     (and
>      mark-active transient-mark-mode))
>
> I'm well aware that behaviour of mark is different in
> both Emacsen and thus proceeding of `(and mark-active
> transient-mark-mode)' will the not be the same as in
> `region-exists-p'. However, in most if not all cases
> the result for the user should be comparable and
> expected.

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




reply via email to

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