From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Karl Eichwalder Newsgroups: gmane.emacs.help Subject: Re: Using skeletons: how to avoid adding newline? Date: Sun, 13 Apr 2003 17:15:42 +0200 Organization: The Moon On Earth 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=us-ascii X-Trace: main.gmane.org 1050248129 26598 80.91.224.249 (13 Apr 2003 15:35:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 13 Apr 2003 15:35:29 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Sun Apr 13 17:35:26 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 194jVu-0006ui-00 for ; Sun, 13 Apr 2003 17:35:26 +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 194jVp-0004kr-05 for gnu-help-gnu-emacs@m.gmane.org; Sun, 13 Apr 2003 11:35:21 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.stueberl.de!newsfeed.r-kom.de!news-nue1.dfn.de!uni-erlangen.de!elvis.franken.de!chico.franken.de!news.franken.de!gnu.franken.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 35 Original-NNTP-Posting-Host: tux.gnu.franken.de Original-X-Trace: tux.gnu.franken.de 1050246942 17636 192.168.1.3 (13 Apr 2003 15:15:42 GMT) Original-X-Complaints-To: newsadm@gnu.franken.de Original-NNTP-Posting-Date: Sun, 13 Apr 2003 15:15:42 +0000 (UTC) Mail-copies-to: never User-Agent: Gnus/5.090018 (Oort Gnus v0.18) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:dEgUHOqZmdoq5NOTUAFHzGprZa0= Original-Xref: shelby.stanford.edu gnu.emacs.help:111939 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:8439 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:8439 Oliver Scholz writes: > Looking at the code of skeleton.el ... this happens because > `skeleton-end-hook' is run after the insertion. Thanks for the hint; this seems to do the trick: (defun ke-wp-make-link () "Create [[wikipedia link]]." (interactive "*") (let ((skeleton-end-newline nil)) (if mark-active (skeleton-insert '(nil "[[" _ "]]") -1) (skeleton-insert '(nil "[[" _ "]]"))))) (global-set-key "\C-c[" 'ke-wp-make-link) Maybe it's worth to add this information to http://www.emacswiki.org/cgi-bin/wiki.pl?SkeletonMode > 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? Yes, this looks like a good idea. Wondering why the default isn't nil? -- 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/ | (*)/'(*)