[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: skeleton.el _ versus @, a new patch

From: Joe Kelsey
Subject: Re: skeleton.el _ versus @, a new patch
Date: 20 Apr 2003 15:50:52 -0700

On Sun, 2003-04-13 at 04:23, Richard Stallman wrote:
>     Before my patch, the behavior was that after insertion of
>     a skeleton, point would be placed at "the first occurrence of _
>     or at the end of the skeleton".
>     What my patch changed is that point after insertion of a skeleton
>     is now placed at "the first occurrence of _ or @
>     or at the end of the skeleton".
> Couldn't you get the same result with the old code
> by writing @ _?

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)))

This allows Stefan to have a character to use for marking skeleton-point
without wrapping the skeleton around the point.  It also allows mmm-mode
to continue to use both @ and _ in their skeletons without suffering
under the undesired semantics of the modified meaning of @ introduced by
Stefan's patch.  I hope that this solves the issue for everyone.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]