From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Joe Kelsey Newsgroups: gmane.emacs.devel Subject: Re: skeleton.el _ versus @, a new patch Date: 22 Apr 2003 17:27:58 -0700 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <1051057678.74664.33.camel@zircon> References: <200303242005.h2OK57gr013285@rum.cs.yale.edu> <1048554010.20622.66.camel@zircon> <200303311740.h2VHeZNG017518@rum.cs.yale.edu> <1049242082.66437.15.camel@zircon> <200304020020.h320K4de023432@rum.cs.yale.edu> <1049245381.66437.33.camel@zircon> <20030403084549.2a5aca76.occitan@esperanto.org> <200304091626.h39GQlwc000430@rum.cs.yale.edu> <1050020736.419.11.camel@zircon> <200304112359.h3BNxpw5012335@rum.cs.yale.edu> <1050879051.74664.17.camel@zircon> <200304211311.h3LDBFLp028593@rum.cs.yale.edu> <1050971563.74664.20.camel@zircon> <200304221331.h3MDVZbX007869@rum.cs.yale.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1051057683 25156 80.91.224.249 (23 Apr 2003 00:28:03 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Apr 2003 00:28:03 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Apr 23 02:28:02 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19887G-0006Xb-00 for ; Wed, 23 Apr 2003 02:28:02 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 1988Ck-0003Mm-00 for ; Wed, 23 Apr 2003 02:33:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19887f-0008KU-04 for emacs-devel@quimby.gnus.org; Tue, 22 Apr 2003 20:28:27 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19887G-0008K8-00 for emacs-devel@gnu.org; Tue, 22 Apr 2003 20:28:02 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19887E-0008Iw-00 for emacs-devel@gnu.org; Tue, 22 Apr 2003 20:28:01 -0400 Original-Received: from dsl231-043-165.sea1.dsl.speakeasy.net ([216.231.43.165] helo=zircon.seattle.wa.us) by monty-python.gnu.org with smtp (Exim 4.10.13) id 19887D-0008Hd-00 for emacs-devel@gnu.org; Tue, 22 Apr 2003 20:27:59 -0400 Original-Received: (qmail 86938 invoked from network); 23 Apr 2003 00:27:58 -0000 Original-Received: from localhost (HELO ?127.0.0.1?) (127.0.0.1) by localhost with SMTP; 23 Apr 2003 00:27:58 -0000 Original-To: Stefan Monnier In-Reply-To: <200304221331.h3MDVZbX007869@rum.cs.yale.edu> X-Mailer: Ximian Evolution 1.2.4 Original-cc: rms@gnu.org Original-cc: dapfy@t-online.de X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:13373 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13373 On Tue, 2003-04-22 at 06:31, Stefan Monnier wrote: > > > > Here is a patch to add - as an alternate skeleton character. - operates > > > > exactly as _ in setting skeleton-point, but does not interact with the > > > > region wrapping effects. This means that @ is completely unaffected and > > > > remains as just the method of setting the skeleton-positions. > > > > > > > > --- skeleton.el.orig Sat Jul 14 04:21:08 2001 > > > > +++ skeleton.el Sun Apr 20 15:44:44 2003 > > > > @@ -453,7 +453,8 @@ > > > > ((eq element '|) > > > > (unless skeleton-modified (pop skeleton))) > > > > ((eq element '@) > > > > - (push (point) skeleton-positions) > > > > + (push (point) skeleton-positions)) > > > > + ((eq element '-) > > > > (unless skeleton-point (setq skeleton-point (point)))) > > > > ((eq 'quote (car-safe element)) > > > > (eval (nth 1 element))) > > > > > > I think in that case, we should set skeleton-point unconditionally. > > > > You *really* only want to set it on the first occurrence of the > > appropriate character, not the last! > > I don't see why anyone would want to put more than 1 such operator > in a skeleton anyway. So reason why I want to make it unconditional > is so that you can do (nil "do {" \n _ \n "} while (" - ")") and be > sure that point will always end up between the parens (I wouldn't > want this behavior, personally, but given such a skeleton why would > the author have put the `-' if it's not to specify where to place > point). I now understand.