From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: CUA mode cursor color Date: 14 May 2002 08:52:49 +0900 Sender: emacs-devel-admin@gnu.org Message-ID: <87u1pbhage.fsf@tc-1-100.kawasaki.gol.ne.jp> References: <200205131700.g4DH0E413260@aztec.santafe.edu> Reply-To: Miles Bader NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1021359814 9064 127.0.0.1 (14 May 2002 07:03:34 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 14 May 2002 07:03:34 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 177WLO-0002Ly-00 for ; Tue, 14 May 2002 09:03:34 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 177WWJ-0005gv-00 for ; Tue, 14 May 2002 09:14:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 177VFE-0005Ev-00; Tue, 14 May 2002 01:53:08 -0400 Original-Received: from smtp02.fields.gol.com ([203.216.5.132]) by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) id 177Pca-0000Jh-00; Mon, 13 May 2002 19:52:52 -0400 Original-Received: from tc-2-222.kawasaki.gol.ne.jp ([203.216.25.222] helo=tc-1-100.kawasaki.gol.ne.jp) by smtp02.fields.gol.com with esmtp (Magnetic Fields) id 177PcY-00075S-00; Tue, 14 May 2002 08:52:50 +0900 Original-Received: by tc-1-100.kawasaki.gol.ne.jp (Postfix, from userid 1000) id AA5FE30A7; Tue, 14 May 2002 08:52:49 +0900 (JST) Original-To: rms@gnu.org System-Type: i686-pc-linux-gnu In-Reply-To: <200205131700.g4DH0E413260@aztec.santafe.edu> Original-Lines: 36 X-Abuse-Complaints: abuse@gol.com Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:3907 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:3907 Richard Stallman writes: > If you have transient-mark-mode enabled, turning on cua-mode and > then turning it off again leaves transient-mark-mode disabled; > it would be much better to leave it in whatever state it was in > originally. > > It would be nice, but I think it is impossible to find a way to handle > this that gives in all cases the result that you would consider > correct. Maybe it's a hard problem in general, but it doesn't seem hard to do a very good job in this case: cua-mode can record whether transient-mark-mode was enabled when it was turned on, by setting variable `cua-mode-tmm-was-enabled' to t. Then when cua-mode is turned off, only disable transient-mark-mode if `cua-mode-tmm-was-enabled' is nil (otherwise, just do nothing). This only fails in the most bizarre of cases; for instance: if t-m-m is disabled, and the user turns on cua-mode, and then turns off t-m-m and then turns t-m-m back on, and somehow expects it to then `stick' if he subsequently turns off cua-mode. This seems like a very unlikely scenario. A bigger problem would be if multiple modes (including cua-mode) try to turn on t-m-m for their own usage; then things would probably get hairy. Currently this doesn't seem to be the case (and if this happens, we could just design some mechanism to deal with it, e.g., ref-counting uses of t-m-m). -Miles -- `...the Soviet Union was sliding in to an economic collapse so comprehensive that in the end its factories produced not goods but bads: finished products less valuable than the raw materials they were made from.' [The Economist]