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: Sun, 28 Oct 2007 16:29:16 +0900 Message-ID: <877il7puib.fsf@uwakimon.sk.tsukuba.ac.jp> References: <200710191149.59775.andreas.roehler@online.de> <87hckeigev.fsf@uwakimon.sk.tsukuba.ac.jp> <200710261017.33513.andreas.roehler@online.de> <877ilai63w.fsf@uwakimon.sk.tsukuba.ac.jp> <87bqal2kxb.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1193556522 14044 80.91.229.12 (28 Oct 2007 07:28:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Oct 2007 07:28:42 +0000 (UTC) Cc: reinersteib+gmane@imap.cc, andreas.roehler@online.de, emacs-devel@gnu.org, juri@jurta.org, monnier@iro.umontreal.ca, miles@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 28 08:28:42 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 1Im2Zd-0006TK-Ny for ged-emacs-devel@m.gmane.org; Sun, 28 Oct 2007 08:28:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Im2ZU-00009f-GQ for ged-emacs-devel@m.gmane.org; Sun, 28 Oct 2007 03:28:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Im2ZP-0008Vu-Gm for emacs-devel@gnu.org; Sun, 28 Oct 2007 03:28:27 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Im2ZM-0008Rp-Jm for emacs-devel@gnu.org; Sun, 28 Oct 2007 03:28:27 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Im2ZM-0008RX-CU for emacs-devel@gnu.org; Sun, 28 Oct 2007 03:28:24 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Im2ZC-00026P-32; Sun, 28 Oct 2007 03:28:14 -0400 Original-Received: from mtps01.sk.tsukuba.ac.jp ([130.158.97.223]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Im2ZB-0002s0-Al; Sun, 28 Oct 2007 03:28:13 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (unknown [130.158.99.156]) by mtps01.sk.tsukuba.ac.jp (Postfix) with ESMTP id 96BB91535BA; Sun, 28 Oct 2007 16:28:11 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id E8E091A2E12; Sun, 28 Oct 2007 16:29:16 +0900 (JST) In-Reply-To: X-Mailer: VM 7.17 under 21.5 (beta28) "fuki" (+CVS-20070621) XEmacs Lucid X-detected-kernel: by mx20.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:81921 Archived-At: 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.)