From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: region-active-p Date: Fri, 26 Oct 2007 22:28:49 -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> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: ger.gmane.org 1193452188 28158 80.91.229.12 (27 Oct 2007 02:29:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Oct 2007 02:29:48 +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: "Stephen J. Turnbull" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 27 04:29:49 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 1IlbQq-00060s-Hy for ged-emacs-devel@m.gmane.org; Sat, 27 Oct 2007 04:29:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IlbQh-0003Ga-Qe for ged-emacs-devel@m.gmane.org; Fri, 26 Oct 2007 22:29:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IlbPw-0002Mk-6F for emacs-devel@gnu.org; Fri, 26 Oct 2007 22:28:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IlbPv-0002LN-4z for emacs-devel@gnu.org; Fri, 26 Oct 2007 22:28:51 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IlbPu-0002L7-Np for emacs-devel@gnu.org; Fri, 26 Oct 2007 22:28:50 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IlbPu-0002mn-BY for emacs-devel@gnu.org; Fri, 26 Oct 2007 22:28:50 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1IlbPt-0008UT-5E; Fri, 26 Oct 2007 22:28:49 -0400 In-reply-to: <877ilai63w.fsf@uwakimon.sk.tsukuba.ac.jp> (stephen@xemacs.org) 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:81818 Archived-At: > If there is no extension, just the mark set, > `zmacs-region-extent' is nil and `region-active-p' > returns nil therefor. Right. However, if zmacs-region-extent is non-nil, it is possible that (region-beginning) equals (region-end), in which case there is (usually) no point in operating on the region. It is that check that Richard is asking about AFAICS. That really puzzles me. It seems to say that in the following XEmacs code (defun fill-paragraph-or-region (arg) "Fill the current region, if it's active; otherwise, fill the paragraph. See `fill-paragraph' and `fill-region' for more information." (interactive "*P") (if (region-active-p) (call-interactively 'fill-region) (call-interactively 'fill-paragraph))) with an active but empty region, region-active-p sometimes returns t and sometimes returns nil. (This is because zmacs-region-extent might be nil, or might be t and empty.) Do I understand correctly?