From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: region-active-p Date: Thu, 25 Oct 2007 04:34:00 +0900 Message-ID: <87sl4071ef.fsf@uwakimon.sk.tsukuba.ac.jp> References: <200710191149.59775.andreas.roehler@online.de> <87lk9wseuf.fsf@catnip.gol.com> <200710212122.57935.andreas.roehler@online.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1193254431 24925 80.91.229.12 (24 Oct 2007 19:33:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Oct 2007 19:33:51 +0000 (UTC) Cc: juri@jurta.org, miles@gnu.org, Andreas =?iso-8859-1?Q?R=F6hler?= , monnier@iro.umontreal.ca, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 24 21:33:50 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Iklz1-0005gE-JZ for ged-emacs-devel@m.gmane.org; Wed, 24 Oct 2007 21:33:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iklyt-0002E0-Cj for ged-emacs-devel@m.gmane.org; Wed, 24 Oct 2007 15:33:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Iklyq-0002DX-CA for emacs-devel@gnu.org; Wed, 24 Oct 2007 15:33:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Iklyn-0002B8-5A for emacs-devel@gnu.org; Wed, 24 Oct 2007 15:33:27 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iklym-0002Av-TT for emacs-devel@gnu.org; Wed, 24 Oct 2007 15:33:24 -0400 Original-Received: from mtps01.sk.tsukuba.ac.jp ([130.158.97.223]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IklyZ-00051Z-Lg; Wed, 24 Oct 2007 15:33:11 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (unknown [130.158.99.156]) by mtps01.sk.tsukuba.ac.jp (Postfix) with ESMTP id 1E3FB1535B3; Thu, 25 Oct 2007 04:33:06 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 32AF91A2E12; Thu, 25 Oct 2007 04:34:01 +0900 (JST) In-Reply-To: X-Mailer: VM 7.17 under 21.5 (beta28) "fuki" (+CVS-20070621) XEmacs Lucid X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:81660 Archived-At: 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.