[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using skeletons: how to avoid adding newline?
From: |
Oliver Scholz |
Subject: |
Re: Using skeletons: how to avoid adding newline? |
Date: |
Sun, 13 Apr 2003 11:18:29 +0200 |
User-agent: |
Gnus/5.090018 (Oort Gnus v0.18) Emacs/21.3.50 (windows-nt) |
Karl Eichwalder <keichwa@gmx.net> writes:
> 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
> "[[" _ "]]")
Looking at the code of skeleton.el ... this happens because
`skeleton-end-hook' is run after the insertion.
,----[ C-h v skeleton-end-hook RET ]
| [...]
|
| Hook called at end of skeleton but before going to point of interest.
| By default this moves out anything following to next line,
| unless `skeleton-end-newline' is set to nil.
| The variables `v1' and `v2' are still set when calling this.
|
| Defined in `skeleton'.
|
| [back]
`----
Setting `skeleton-end-newline' to nil, does help indeed. But I have
no idea whether this causes trouble elsewhere. Perhaps it is best to
set it buffer locally?
Oliver
--
24 Germinal an 211 de la Révolution
Liberté, Egalité, Fraternité!