[Top][All Lists]

[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: Thu, 25 Oct 2007 04:34:00 +0900

Richard Stallman writes:

 > When commands in XEmacs call [region-active-p], do they also test
 > for a nonempty region?  Or do they operate on the region
 > when it is empty?

Core commands defined in Lisp don't test (at least not within 3 lines,
checked with grep -3), but they're generally wrappers for functions
defined in C that do test (eg, the casefilling commands).

 > I don't see any need for region-exists-p
 > unless we want it specifically to run code in Emacs
 > which was written for XEmacs.

The use-case in XEmacs is that some code wishes to operate on the
region regardless of whether it is active.  All examples in XEmacs
core code are used to determine whether a menu item or dialog button
is active; I presume that the corresponding functions query the user
if the region exists but is inactive, and simply executes if the
region is active.  I don't know if there are any important uses.

reply via email to

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