From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: region-active-p Date: Sat, 27 Oct 2007 21:21:16 -0400 Message-ID: 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 1193534499 6172 80.91.229.12 (28 Oct 2007 01:21:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Oct 2007 01:21:39 +0000 (UTC) Cc: reinersteib+gmane@imap.cc, andreas.roehler@online.de, emacs-devel@gnu.org, juri@jurta.org, "Stephen J. Turnbull" , miles@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 28 02:21:39 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 1IlwqR-0005Hl-H6 for ged-emacs-devel@m.gmane.org; Sun, 28 Oct 2007 02:21:39 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IlwqI-00050F-D0 for ged-emacs-devel@m.gmane.org; Sat, 27 Oct 2007 21:21:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IlwqF-0004zW-8F for emacs-devel@gnu.org; Sat, 27 Oct 2007 21:21:27 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IlwqD-0004xn-2f for emacs-devel@gnu.org; Sat, 27 Oct 2007 21:21:26 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IlwqC-0004xZ-TO for emacs-devel@gnu.org; Sat, 27 Oct 2007 21:21:24 -0400 Original-Received: from tomts40.bellnexxia.net ([209.226.175.97] helo=tomts40-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ilwq5-0006JT-Qb; Sat, 27 Oct 2007 21:21:18 -0400 Original-Received: from pastel.home ([74.12.208.145]) by tomts40-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20071028012116.JNOA1617.tomts40-srv.bellnexxia.net@pastel.home>; Sat, 27 Oct 2007 21:21:16 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 427F280F4; Sat, 27 Oct 2007 21:21:15 -0400 (EDT) In-Reply-To: (Richard Stallman's message of "Sat\, 27 Oct 2007 19\:41\:47 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Solaris 8 (1) 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:81906 Archived-At: > 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? I expect the opposite makes more sense: (defun region-active-p (&optional allow-empty) "Return non-nil if the region is active. Optional argument ALLOW-EMPTY non-nil means that an empty region may also be considered as active." ...) This is because in most cases we've seen we want to treat empty regions as inactive. Stefan