From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas =?iso-8859-15?q?R=F6hler?= Newsgroups: gmane.emacs.devel Subject: Re: region-active-p Date: Tue, 23 Oct 2007 10:53:26 +0200 Message-ID: <200710231053.28105.andreas.roehler@online.de> References: <200710191149.59775.andreas.roehler@online.de> <200710212122.57935.andreas.roehler@online.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1193129672 1934 80.91.229.12 (23 Oct 2007 08:54:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Oct 2007 08:54:32 +0000 (UTC) Cc: Juri Linkov , "Stephen J. Turnbull" , emacs-devel@gnu.org, Stefan Monnier , Miles Bader To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 23 10:54:32 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 1IkFWq-0007dL-OM for ged-emacs-devel@m.gmane.org; Tue, 23 Oct 2007 10:54:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IkFWi-000494-Rn for ged-emacs-devel@m.gmane.org; Tue, 23 Oct 2007 04:54:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IkFWS-0003vb-DC for emacs-devel@gnu.org; Tue, 23 Oct 2007 04:54:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IkFWR-0003ta-6G for emacs-devel@gnu.org; Tue, 23 Oct 2007 04:53:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IkFWQ-0003sy-SP for emacs-devel@gnu.org; Tue, 23 Oct 2007 04:53:58 -0400 Original-Received: from moutng.kundenserver.de ([212.227.126.174]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IkFWH-0008F7-4Q; Tue, 23 Oct 2007 04:53:49 -0400 Original-Received: from noname (p54BEA7AB.dip0.t-ipconnect.de [84.190.167.171]) by mrelayeu.kundenserver.de (node=mrelayeu8) with ESMTP (Nemesis) id 0ML31I-1IkFWA35oW-0008MD; Tue, 23 Oct 2007 10:53:44 +0200 User-Agent: KMail/1.9.5 In-Reply-To: Content-Disposition: inline X-Provags-ID: V01U2FsdGVkX18s4GYcTRBgwqPeBlcTMU/DPdwI1tSDGK8ScKY hBWC1O1FwgM57SpMbZKMPCs35YQcfMQhg9MyqAT+UCgoElAcmD uwGi56+lTt++qNlp2quTA== X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) 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:81532 Archived-At: Am Dienstag, 23. Oktober 2007 09:12 schrieb Richard Stallman: > (defun region-active-p () > "..." > (and zmacs-regions zmacs-region-extent > (eq (current-buffer) (zmacs-region-buffer)))) > > When commands in XEmacs call this, do they also test > for a nonempty region? Or do they operate on the region > when it is empty? No. AFAIU `zmacs-region-extent' checks for a physical extend, it may be nil= or=20 have a value, for example I got ,---- | `zmacs-region-extent' is a variable declared in Lisp. | -- loaded from "/home/speck/progarbeit/xemacs/veraendert/simple.el" |=20 | Value: # |=20 | Documentation: | The extent of the zmacs region; don't use this.=20 `---- `zmacs-regions' seems equivalent to `transient-mark-mode': ,---- | `zmacs-regions' is a built-in boolean variable. | -- loaded=20 from "/usr/src/packages/BUILD/xemacs-21.5.27.20060705/src/editfns.c" |=20 | Value: t |=20 | Documentation: | *Whether LISPM-style active regions should be used. | This means that commands which operate on the region (the area between the | point and the mark) will only work while the region is in the ``active'' | state, which is indicated by highlighting. `---- > > 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. AFAIS `region-exists-p' in XEmacs delivers precisely the value `mark-active' in GNU has. To provide respective symbols in both Emacsen would save time for programmers. Maybe it could be written in GNU somehow as (defun region-exists-p () mark-active) and in XEmacs (setq mark-active (region-exists-p)) Andreas R=F6hler