[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: region-active-p et al
From: |
Eli Zaretskii |
Subject: |
Re: region-active-p et al |
Date: |
Mon, 02 Jan 2017 17:33:53 +0200 |
> From: Andreas Röhler <address@hidden>
> Date: Mon, 2 Jan 2017 12:50:35 +0100
>
> Happy new year!
And the same to you.
> Got a bug-report at
> https://gitlab.com/python-mode-devs/python-mode/issues/27 which points
> me at a quirk in region-active-p:
>
> Questioning transient-mark-mode does not belong here. It's a
> user/convenience thing whilst
> region-active-p is a core thing.
Actually, both region-active-p and use-region-p are explicitly
documented to pay attention to transient-mark-mode. These two
functions exist to allow applications to change their behavior when an
active region (not just any region) exists.
If python-mode wants to act on region regardless of
transient-mark-mode, it should look at the mark, and not use these two
functions. They are not meant for that use case.