unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* region-active-p et al
@ 2017-01-02 11:50 Andreas Röhler
  2017-01-02 15:33 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Röhler @ 2017-01-02 11:50 UTC (permalink / raw)
  To: emacs-devel@gnu.org

Happy new year!

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.

A work-around in python-mode.el would ask (and (mark) (not (eq (mark) 
(point)))) instead of
region-active-p resp. use-region-p.

Cheers,

Andreas





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: region-active-p et al
  2017-01-02 11:50 region-active-p et al Andreas Röhler
@ 2017-01-02 15:33 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2017-01-02 15:33 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: emacs-devel

> From: Andreas Röhler <andreas.roehler@online.de>
> 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.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-02 15:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-02 11:50 region-active-p et al Andreas Röhler
2017-01-02 15:33 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).