From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Oliver Scholz Newsgroups: gmane.emacs.help Subject: Re: Using skeletons: how to avoid adding newline? Date: Sun, 13 Apr 2003 11:18:29 +0200 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1050225979 30441 80.91.224.249 (13 Apr 2003 09:26:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 13 Apr 2003 09:26:19 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Sun Apr 13 11:26:17 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 194dkf-0007ur-00 for ; Sun, 13 Apr 2003 11:26:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 194djg-0007pM-03 for gnu-help-gnu-emacs@m.gmane.org; Sun, 13 Apr 2003 05:25:16 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!bloom-beacon.mit.edu!news.telebyte.nl!fu-berlin.de!uni-berlin.de!dialin-145-254-191-059.arcor-ip.NET!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 35 Original-NNTP-Posting-Host: dialin-145-254-191-059.arcor-ip.net (145.254.191.59) Original-X-Trace: fu-berlin.de 1050225616 13404423 145.254.191.59 (16 [87814]) X-Attribution: os X-Face: "HgH2sgK|bfH$; PiOJI6|qUCf.ve<51_Od(%ynHr?=>znn#~#oS>",F%B8&\vus),2AsPYb -n>PgddtGEn}s7kH?7kH{P_~vu?]OvVN^qD(L)>G^gDCl(U9n{:d>'DkilN!_K"eNzjrtI4Ya6;Td% IZGMbJ{lawG+'J>QXPZD&TwWU@^~A}f^zAb[Ru;CT(UA]c& User-Agent: Gnus/5.090018 (Oort Gnus v0.18) Emacs/21.3.50 (windows-nt) Cancel-Lock: sha1:+HU6CY3CzyPNTN5YMtgCQwk/o6U= Original-Xref: shelby.stanford.edu gnu.emacs.help:111930 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:8430 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:8430 Karl Eichwalder 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é!