all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [joe@zircon.seattle.wa.us: skeleton.el _ versus @]
@ 2003-03-24 19:27 Richard Stallman
  2003-03-24 20:05 ` skeleton.el _ versus @ Stefan Monnier
  0 siblings, 1 reply; 42+ messages in thread
From: Richard Stallman @ 2003-03-24 19:27 UTC (permalink / raw)
  Cc: joe

Does anyone know enough about skeleton.el to think intelligently
about this issue?

------- Start of forwarded message -------
Date: 23 Mar 2003 23:55:35 -0000
From: Joe Kelsey <joe@zircon.seattle.wa.us>
To: bug-gnu-emacs@gnu.org
cc: mmm-mode-discuss@lists.sourceforge.net
Subject: skeleton.el _ versus @
Sender: bug-gnu-emacs-bounces+rms=gnu.org@gnu.org

In GNU Emacs 21.2.1 (i386--freebsd, X toolkit, Xaw3d scroll bars)
 of 2002-11-08 on zircon.zircon.seattle.wa.us

skeleton.el confuses the roles of _ and @.

_ serves two purposes: mark the "interesting" skeleton-point, and mark
region-skip points, depending on whether or not the skeleton is being
inserted in a plain context, or in a "region" context.

@ serves as a "back-up" setting for skeleton-point and also to mark the
skeleton-positions.

My contention is that the use of @ as a backup to _ in setting
skeleton-point is incorrect.  When a skeleton contains both @ and _
markers, obviously the _ should be used to set the skeleton-point and
the @ should be used to set skeleton-positions when the skeleton is used
in simple insertion mode.

When the skeleton is used in region-list-context mode, there must be
multiple occurrences of _ to mark where the insertion code is supposed
to skip to the end of the next region.  In this case, there probably
aren't any @ markers.  The first _ can serve as skeleton-point.

If a simple skeleton is used without any _ markers, then the user hasn't
thought about where they want point to end up and it doesn't really
matter where it ends up.

I propose the following modification to skeleton.el:

- --- lisp/skeleton.el.orig	Sat Jul 14 04:21:08 2001
+++ lisp/skeleton.el	Sun Mar 23 15:28:03 2003
@@ -453,8 +453,7 @@
 	((eq element '|)
 	 (unless skeleton-modified (pop skeleton)))
 	((eq element '@)
- -	 (push (point) skeleton-positions)
- -	 (unless skeleton-point (setq skeleton-point (point))))
+	 (push (point) skeleton-positions))
 	((eq 'quote (car-safe element))
 	 (eval (nth 1 element)))
 	((or (stringp (car-safe element))

Basically, this removes the setting of skeleton-point from the @
actions.

/Joe


_______________________________________________
Bug-gnu-emacs mailing list
Bug-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs
------- End of forwarded message -------

^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2003-05-18  1:31 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-24 19:27 [joe@zircon.seattle.wa.us: skeleton.el _ versus @] Richard Stallman
2003-03-24 20:05 ` skeleton.el _ versus @ Stefan Monnier
2003-03-25  1:00   ` Joe Kelsey
2003-03-30 18:51     ` Joe Kelsey
2003-03-31 17:40     ` Stefan Monnier
2003-04-01  1:58       ` Joe Kelsey
2003-04-01  7:25         ` Miles Bader
2003-04-01 18:41         ` Stefan Monnier
2003-04-02  0:08       ` Joe Kelsey
2003-04-02  0:20         ` Stefan Monnier
2003-04-02  1:03           ` Joe Kelsey
2003-04-02  1:17             ` Thien-Thi Nguyen
2003-04-02  1:33             ` Stefan Monnier
2003-04-03  0:16               ` Joe Kelsey
2003-04-03  0:28                 ` Miles Bader
2003-04-03  6:45             ` Daniel Pfeiffer
2003-04-09 16:26               ` Stefan Monnier
2003-04-10  0:00                 ` Joe Kelsey
2003-04-10 22:47                   ` Richard Stallman
2003-04-11  0:25                     ` Joe Kelsey
2003-04-11 23:45                       ` Richard Stallman
2003-04-11 23:59                         ` Stefan Monnier
2003-04-12  0:11                           ` Joe Kelsey
2003-04-12  8:51                             ` Kai Großjohann
2003-04-13 11:23                           ` Richard Stallman
2003-04-13 16:41                             ` Stefan Monnier
2003-04-13 18:54                               ` Kai Großjohann
2003-04-13 19:11                             ` Joe Kelsey
2003-04-20 22:50                             ` skeleton.el _ versus @, a new patch Joe Kelsey
2003-04-21 13:11                               ` Stefan Monnier
2003-04-22  0:32                                 ` Joe Kelsey
2003-04-22 13:31                                   ` Stefan Monnier
2003-04-23  0:27                                     ` Joe Kelsey
2003-04-22  0:45                               ` Richard Stallman
2003-04-22  1:30                                 ` Joe Kelsey
2003-04-24  1:50                                   ` Richard Stallman
2003-04-24 15:59                                     ` Joe Kelsey
2003-04-26  2:31                                       ` Richard Stallman
2003-04-28 21:51                                         ` Stefan Monnier
2003-04-29 19:29                                           ` Richard Stallman
2003-05-18  1:31                                             ` Joe Kelsey
2003-04-02 19:26         ` skeleton.el _ versus @ Richard Stallman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.