From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas =?iso-8859-1?q?R=F6hler?= Newsgroups: gmane.emacs.devel Subject: Re: region-active-p Date: Mon, 29 Oct 2007 09:24:23 +0100 Message-ID: <200710290924.23993.andreas.roehler@online.de> References: <200710191149.59775.andreas.roehler@online.de> <877il7puib.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1193646237 3863 80.91.229.12 (29 Oct 2007 08:23:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Oct 2007 08:23:57 +0000 (UTC) Cc: Richard Stallman , Reiner Steib , Juri Linkov , Stefan Monnier , Stephen Turnbull , Miles Bader To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 29 09:23:59 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 1ImPug-0007hp-9O for ged-emacs-devel@m.gmane.org; Mon, 29 Oct 2007 09:23:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ImPuW-0001Bf-RV for ged-emacs-devel@m.gmane.org; Mon, 29 Oct 2007 04:23:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ImPuT-00016y-7o for emacs-devel@gnu.org; Mon, 29 Oct 2007 04:23:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ImPuR-00014e-8u for emacs-devel@gnu.org; Mon, 29 Oct 2007 04:23:44 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ImPuR-00014A-1e for emacs-devel@gnu.org; Mon, 29 Oct 2007 04:23:43 -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 1ImPuH-0008P6-AS; Mon, 29 Oct 2007 04:23:33 -0400 Original-Received: from moutng.kundenserver.de ([212.227.126.171]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ImPuF-000296-To; Mon, 29 Oct 2007 04:23:32 -0400 Original-Received: from noname (p54BE9557.dip0.t-ipconnect.de [84.190.149.87]) by mrelayeu.kundenserver.de (node=mrelayeu2) with ESMTP (Nemesis) id 0MKwtQ-1ImPu33AVR-0001lU; Mon, 29 Oct 2007 09:23:20 +0100 User-Agent: KMail/1.9.5 In-Reply-To: <877il7puib.fsf@uwakimon.sk.tsukuba.ac.jp> Content-Disposition: inline X-Provags-ID: V01U2FsdGVkX1+Iyl6+BmYd4UZ6nDZnJvGVjv60w9xQRMoYfa6 IcjBwhlJTUHz4kLUZ81dfYPpoi3M7cgW/3X8qVpgxcCg4q15FR olACfJRXNy8lp0OOHtnTA== X-detected-kernel: by mx20.gnu.org: Linux 2.6? (barebone, rare!) 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:82035 Archived-At: Am Sonntag, 28. Oktober 2007 08:29 schrieb Stephen J. Turnbull: > 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',=20 =46or compatibility we should have both.=20 (defun region-exists-p () mark-active) and =A0(defun region-active-p (&optional allow-empty) =2E.. Andreas R=F6hler > since the former makes sense to=20 > the user regardless of whether zmacs-regions/transient-mark-mode is > active.)