emacs-devel
[Top][All Lists]
Advanced

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

Re: region-active-p


From: Stephen J. Turnbull
Subject: Re: region-active-p
Date: Sun, 28 Oct 2007 16:29:16 +0900

Richard Stallman writes:

 > Thanks.  Now I understand what XEmacs does here.
 > 
 > I propose to add an optional argument NONEMPTY to region-active-p
 > which means "return nil if the region is empty".  How about it?

No, thank you.  That makes the name inaccurate in XEmacs usage, is not
backwardly compatible (unlike GNU, we support older versions of XEmacs
which will not support that argument), is IMO less readable than using
an explicit check where the optimization is appropriate and needed,
and as far as I know is redundant in current XEmacsen because functions
where the check is appropriate already do it (typically very quickly
because they do it in C).

A new API defaulting to the semantics of `region-exists-p' would be
preferable.  (Not `region-active-p', since the former makes sense to
the user regardless of whether zmacs-regions/transient-mark-mode is
active.)





reply via email to

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