From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.devel Subject: Re: region-active-p Date: Sun, 21 Oct 2007 22:54:08 +0200 Message-ID: References: <200710191149.59775.andreas.roehler@online.de> <87bqau3iq5.fsf@jurta.org> <87k5pgl72e.fsf@uwakimon.sk.tsukuba.ac.jp> Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1193000112 24139 80.91.229.12 (21 Oct 2007 20:55:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 21 Oct 2007 20:55:12 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 21 22:55:12 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 1IjhpI-0002ai-E4 for ged-emacs-devel@m.gmane.org; Sun, 21 Oct 2007 22:55:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IjhpA-0003lb-PF for ged-emacs-devel@m.gmane.org; Sun, 21 Oct 2007 16:55:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ijhp6-0003ko-Am for emacs-devel@gnu.org; Sun, 21 Oct 2007 16:55:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ijhp4-0003jK-Sb for emacs-devel@gnu.org; Sun, 21 Oct 2007 16:54:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ijhp4-0003j7-Ir for emacs-devel@gnu.org; Sun, 21 Oct 2007 16:54:58 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ijhp4-0007h9-2o for emacs-devel@gnu.org; Sun, 21 Oct 2007 16:54:58 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Ijhor-0006HL-Vd for emacs-devel@gnu.org; Sun, 21 Oct 2007 20:54:45 +0000 Original-Received: from p54a96490.dip.t-dialin.net ([84.169.100.144]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 21 Oct 2007 20:54:45 +0000 Original-Received: from Reiner.Steib by p54a96490.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 21 Oct 2007 20:54:45 +0000 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 48 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: p54a96490.dip.t-dialin.net X-Face: 'bg&jY[8V'W&:=~6w"|>}#4/T; w~36ei4NNMyKRR.a$n=$|sWFPF1y]a\>6kc\*#GN]UDM| Ywv, vbL^XF1nIp\:F=$Ei2o&mEe:%N~, :3]vtQ~s9u$9izmX$IF@VgGl7/, ^dbuM<3|AO2}.%|%?kZ 2Y=@\U!~cll^=8Z9ihKq%wmUe1Ky(#kl3T'>Qk0Ia3mCBsTk?E(,X Mail-Copies-To: nobody User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) Cancel-Lock: sha1:qbbQJ8T0PMTjiN0ICHBeNvd8ZrE= 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:81404 Archived-At: On Sun, Oct 21 2007, Stephen J. Turnbull wrote: > Stefan Monnier writes: > > > I agree. But we need to decide whether (not (eq (region-beginning) > > > (region-end))) should be part of it. > > > > I think it should be part of it. [...] > > Please implement this interpretation. It is the interpretation used > by XEmacs since time immemorial (to me, anyway): > > ------------------------------------------------------------------------ > `region-active-p' is a compiled Lisp function > -- loaded from "/playpen/src/XEmacs/git-staging/lisp/simple.elc" > (region-active-p) > > Documentation: > Return non-nil if the region is active in the current buffer. > If `zmacs-regions' is true, this is equivalent to `region-exists-p'. > Otherwise, this function always returns false. > ------------------------------------------------------------------------ > > I believe `zmacs-regions' is the variable that `transient-mark-mode' > emulates. FWIW, Gnus has the following compatibility functions (gnus-ems.el): (defun gnus-region-active-p () "Say whether the region is active." (and (boundp 'transient-mark-mode) transient-mark-mode (boundp 'mark-active) mark-active)) (defun gnus-mark-active-p () "Non-nil means the mark and region are currently active in this buffer." mark-active) ; aliased to region-exists-p in XEmacs. When running Gnus in XEmacs, these are aliased: gnus-xmas.el:433: (defalias 'gnus-region-active-p 'region-active-p) gnus-xmas.el:434: (defalias 'gnus-mark-active-p 'region-exists-p) Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/