help-gnu-emacs
[Top][All Lists]
Advanced

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

Using skeletons: how to avoid adding newline?


From: Karl Eichwalder
Subject: Using skeletons: how to avoid adding newline?
Date: Sun, 13 Apr 2003 08:43:07 +0200
User-agent: Gnus/5.090018 (Oort Gnus v0.18) Emacs/21.3.50 (gnu/linux)

I'm trying to accomplish something very basic: "link" should become
[[link]]; this code snippet works but I'd like to avoid the newline
after "]]":

(define-skeleton ke-wp-make-link
  "Create [[wikipedia link]]."
  nil
  "[[" _ "]]")

(global-set-key "\C-c[" 'ke-wp-make-link)

This is what I do:

1. Enter ("-!-" [[marks]]
the point):

    Create -!-link here

2. Press "C-SPC" and "M-f" to mark a region:

    Create link-!- here

3. Press "C-c [" to add [[...]]:
   =>
    Create [[link]]
    -!- here

   But I want to see:

    Create [[link]]-!- here
 
-- 
ke@suse.de (work) / keichwa@gmx.net (home):              |
http://www.gnu.franken.de/ke/                            |      ,__o
Free Translation Project:                                |    _-\_<,
http://www.iro.umontreal.ca/contrib/po/HTML/             |   (*)/'(*)


reply via email to

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