From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.devel Subject: Re: Shift selection using interactive spec Date: Mon, 17 Mar 2008 01:21:37 +0100 Message-ID: <47DDB991.1070909@gmail.com> References: <87k5k69p92.fsf@stupidchicken.com> <200803140408.m2E47hPU014494@sallyv1.ics.uci.edu> <87prtxpekk.fsf@kfs-lx.rd.rdm> <87abl11ilo.fsf@stupidchicken.com> <874pb9koyw.fsf@stupidchicken.com> <87od9gzqv9.fsf@stupidchicken.com> <87bq5gytbi.fsf@stupidchicken.com> <8763vndi0r.fsf@kfs-lx.rd.rdm> <47DC3AB2.9070502@emf.net> <87ejabv7gg.fsf@stupidchicken.com> <47DC79DE.1000201@emf.net> <47DD8A53.8090902@emf.net> <47DDA79A.6010706@gmail.com> <47DDBF57.3080908@emf.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1205713338 1857 80.91.229.12 (17 Mar 2008 00:22:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Mar 2008 00:22:18 +0000 (UTC) Cc: Chong Yidong , Dan Nicolaescu , emacs-devel@gnu.org, Stefan Monnier , "Kim F. Storm" To: Thomas Lord Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 17 01:22:46 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 1Jb37g-000823-6n for ged-emacs-devel@m.gmane.org; Mon, 17 Mar 2008 01:22:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jb376-0001AO-Fz for ged-emacs-devel@m.gmane.org; Sun, 16 Mar 2008 20:22:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jb372-0001AJ-So for emacs-devel@gnu.org; Sun, 16 Mar 2008 20:22:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jb370-00019H-EC for emacs-devel@gnu.org; Sun, 16 Mar 2008 20:21:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jb370-00019B-Bb for emacs-devel@gnu.org; Sun, 16 Mar 2008 20:21:58 -0400 Original-Received: from ch-smtp01.sth.basefarm.net ([80.76.149.212]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jb36z-0003RV-Ss for emacs-devel@gnu.org; Sun, 16 Mar 2008 20:21:58 -0400 Original-Received: from c83-254-148-228.bredband.comhem.se ([83.254.148.228]:61545 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1Jb36o-0000iI-4R; Mon, 17 Mar 2008 01:21:46 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 In-Reply-To: <47DDBF57.3080908@emf.net> X-Antivirus: avast! (VPS 080316-0, 2008-03-16), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.148.228 X-ACL-Warn: Too high rate of unknown addresses received from you X-Scan-Result: No virus found in message 1Jb36o-0000iI-4R. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1Jb36o-0000iI-4R d1f6c5cdee3ce038b1d584744f512296 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:92790 Archived-At: Thomas Lord wrote: > Lennart Borgman (gmail) wrote: >> >> I translate it to something like this in elisp code: >> >> ;;;; pre-pre >> ... > > There's no need for a pre-pre hook or > for a test of whether the last sequence > was shifted. You're using the "three variables" > correctly, but there are simpler ways to use them > to achieve the same effect. Yes, I use pre-pre just as a name for a position in the command loop. It could be a hook, but need of course not be implemented that way. Sorry for writing the code a bit un-lispish ;-) >> ;;;; post-post >> ;; >> (if buffer-was-changed >> (setq preserved-tm nil) >> (unless preserved-tm >> (when user-wants-it >> (setq preserved-tm maybe-preserved-tm)))) >> (setq tm preserved-tm) >> >> > > > No. "buffer-was-changed" has nothing to do with > anything here. Sorry. Thanks for the clarification. > Nor is there any need > for a "post-post" hook. The command loop can > simply, unconditionally, copy tentative-mark to > maybe-preserved-... before running a command, > and preserved-... to tentative-mark before returning > control to the user -- two unconditional "setq"s in > the loop. None of this "buffer-was-changed" stuff. > Those distinctions happen elsewhere in this scheme, > and on a different basis. > > -t > > > > -t > >