From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: deactivation in "shift-select" mode Date: Fri, 07 Mar 2008 21:22:55 -0500 Message-ID: <87ablat0n4.fsf@stupidchicken.com> References: <200803050637.m256bXL3008361@sallyv1.ics.uci.edu> <87hcfkdhqk.fsf@stupidchicken.com> <87d4q8sq9c.fsf@jurta.org> <8763w0n393.fsf@catnip.gol.com> <871w6ounk0.fsf@kfs-lx.rd.rdm> <87ablacdxt.fsf@catnip.gol.com> <871w6mc8iy.fsf_-_@catnip.gol.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1204943129 11671 80.91.229.12 (8 Mar 2008 02:25:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Mar 2008 02:25:29 +0000 (UTC) Cc: juri@jurta.org, "Kim F. Storm" , rms@gnu.org, emacs-devel@gnu.org To: Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 08 03:25:56 2008 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 1JXokw-00053o-4y for ged-emacs-devel@m.gmane.org; Sat, 08 Mar 2008 03:25:50 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXokO-00076b-CO for ged-emacs-devel@m.gmane.org; Fri, 07 Mar 2008 21:25:16 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JXokK-00075k-06 for emacs-devel@gnu.org; Fri, 07 Mar 2008 21:25:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JXokI-00074h-IW for emacs-devel@gnu.org; Fri, 07 Mar 2008 21:25:11 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXokI-00074e-D9 for emacs-devel@gnu.org; Fri, 07 Mar 2008 21:25:10 -0500 Original-Received: from cyd.mit.edu ([18.115.2.24]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JXokB-0008Uh-06; Fri, 07 Mar 2008 21:25:03 -0500 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id DBC434E401; Fri, 7 Mar 2008 21:22:55 -0500 (EST) In-Reply-To: <871w6mc8iy.fsf_-_@catnip.gol.com> (Miles Bader's message of "Sat\, 08 Mar 2008 10\:24\:37 +0900") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.92 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:91690 Archived-At: Miles Bader writes: > Johan Bockg=C3=A5rd pointed out (on the #emacs irc channel) that > transient-mark-mode actually _already_ has enough functionality to > allow implementing the desired "deactivation" behavior for > shift-select (where non-shifted movement keys automatically deactivate > any mark which was activated by shifted movement keys), without using > post-command-hook at all! > > Basically his idea is to use the "only mode" feature of > transient-mark-mode (setting the transient-mark-mode variable to 'only > instead of t). > > I've attached a proof-of-concept that shows how it works; this code > only implements shift-select for the basic cursor movement keys plus > forward/backward-word, but it's obviously trivial to extend to any > other commands desired. Bit confused. AFAICT, the function region-active-p which you use isn't defined, and the "only mode" feature transient-mark-mode doesn't exist/isn't documented. Is this a feature from XEmacs?