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: [cvs] bug when using pc-selection-mode/transient-mark-mode Date: Sun, 22 Sep 2002 21:18:42 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: <20020923011842.GA29226@gnu.org> References: <200209222248.g8MMmKZ26653@rum.cs.yale.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1032744086 20511 127.0.0.1 (23 Sep 2002 01:21:26 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 23 Sep 2002 01:21:26 +0000 (UTC) Cc: Karl Chen , Richard Stallman , emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17tHuf-0005Kh-00 for ; Mon, 23 Sep 2002 03:21:25 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17tIai-0007uo-00 for ; Mon, 23 Sep 2002 04:04:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17tHue-0003Xl-00; Sun, 22 Sep 2002 21:21:24 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17tHsC-0003Wg-00 for emacs-devel@gnu.org; Sun, 22 Sep 2002 21:18:52 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17tHs9-0003WK-00 for emacs-devel@gnu.org; Sun, 22 Sep 2002 21:18:51 -0400 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17tHs9-0003WE-00 for emacs-devel@gnu.org; Sun, 22 Sep 2002 21:18:49 -0400 Original-Received: from miles by fencepost.gnu.org with local (Exim 4.10) id 17tHs2-00088l-00; Sun, 22 Sep 2002 21:18:42 -0400 Original-To: Stefan Monnier Content-Disposition: inline In-Reply-To: <200209222248.g8MMmKZ26653@rum.cs.yale.edu> User-Agent: Mutt/1.3.28i Blat: Foop Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:8106 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8106 On Sun, Sep 22, 2002 at 06:48:20PM -0400, Stefan Monnier wrote: > `mark-active' is buffer-local and I think `deactivate-mark' should > be buffer-local as well. But that begs the question "when do we check > whether deactivate-mark was set and reset mark-active accordingly" ? > Are we going to loop through all buffers, looking for ones with > a non-nil deactivate-mark ? How about something like: (1) `mark-active' gets set to a (global) integer counter value instead of t. (2) In the current place where `deactivate-mark' is checked, it just handles the current buffer, but also increments the global counter. (3) `switch-to-buffer' checks to see if `mark-active' is less than the global counter value, and if so, checks the local value of `deactivate-mark' and perhaps sets mark-active to nil. IOW, it lazily does the deactivation based on the local value of deactivate-mark. Is this too expensive a thing to take place in switch-to-buffer? > So maybe we should not make it buffer-local but instead make it hold > a list of buffers whose mark should be deactivated. > Currently we only use t or nil where t means "current-buffer". Doesn't that require all the places where deactivate-mark is set to be changed (in a non-trivial way)? Sounds very annoying for programmers... [and a maintainance headache] -Miles -- P.S. All information contained in the above letter is false, for reasons of military security.