unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Joe Kelsey <joe@zircon.seattle.wa.us>
Cc: emacs-devel@gnu.org
Subject: Re: skeleton.el _ versus @, a new patch
Date: 17 May 2003 18:31:48 -0700	[thread overview]
Message-ID: <1053221508.430.2.camel@zircon> (raw)
In-Reply-To: <E19Aamt-0003ZA-00@fencepost.gnu.org>

[-- Attachment #1: Type: text/plain, Size: 224 bytes --]

On Tue, 2003-04-29 at 12:29, Richard Stallman wrote:
> Could you send me the proper change, with change log entry and NEWS entry?
> I will get it installed.

Here is a diff for lisp/skeleton.el and a ChangeLog entry.

/Joe


[-- Attachment #2: skeleton.el.diff --]
[-- Type: text/plain, Size: 2217 bytes --]

--- skeleton.el.orig	Sat Jul 14 04:21:08 2001
+++ skeleton.el	Wed May  7 08:56:30 2003
@@ -262,6 +262,8 @@
 
 	\\n	go to next line and indent according to mode
 	_	interesting point, interregion here
+	-	interesting point, no interregion interaction, overrides
+		interesting point set by _
 	>	indent line (or interregion if > _) according to major mode
 	@	add position to `skeleton-positions'
 	&	do next ELEMENT iff previous moved point
@@ -270,8 +272,8 @@
 	resume:	skipped, continue here if quit is signaled
 	nil	skipped
 
-After termination, point will be positioned at the first occurrence
-of _ or @ or at the end of the inserted text.
+After termination, point will be positioned at the last occurrence of -
+or at the first occurrence of _ or at the end of the inserted text.
 
 Further elements can be defined via `skeleton-further-elements'.  ELEMENT may
 itself be a SKELETON with an INTERACTOR.  The user is prompted repeatedly for
@@ -295,6 +297,13 @@
 	input	initial input (string or cons with index) while reading str
 	v1, v2	local variables for memorizing anything you want
 
+Note that the internal skeleton processing modifies the first occurrence
+of str in each skeleton into a lisp form to set str to the value of
+`skeleton-read' called with the first skeleton list element.  Thus, if
+you intend to use the value of str in a complex lisp expression, it is
+best to simply inert the value first and then use it in a quoted lisp
+expression or one which returns nil (as in (progn (blah...) nil) )..
+
 When done with skeleton, but before going back to `_'-point call
 `skeleton-end-hook' if that is non-`nil'."
   (let ((skeleton-regions regions))
@@ -448,13 +457,14 @@
 		    (end-of-line 0)))
 	   (or skeleton-point
 	       (setq skeleton-point (point)))))
+	((eq element '-)
+	 (setq skeleton-point (point)))
 	((eq element '&)
 	 (when skeleton-modified (pop skeleton)))
 	((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))

[-- Attachment #3: ChangeLog --]
[-- Type: text/plain, Size: 185 bytes --]

2003-05-07  Joe Kelsey  <joek@flyingcroc.net>

	* skeleton.el (skeleton-internal-1): Allow - as alternate
	interesting point marker and revert @ to just setting
	skeleton-positions.
	


[-- Attachment #4: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel

  reply	other threads:[~2003-05-18  1:31 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2003-04-02 19:26         ` skeleton.el _ versus @ Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1053221508.430.2.camel@zircon \
    --to=joe@zircon.seattle.wa.us \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).