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: skeletons/abbrevs Date: Sat, 26 Apr 2003 11:34:33 +0200 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <878ytxhaae.fsf@ID-87814.user.dfncis.de> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1051350110 13929 80.91.224.249 (26 Apr 2003 09:41:50 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 26 Apr 2003 09:41:50 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 26 11:41:48 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 199MBo-0003cW-00 for ; Sat, 26 Apr 2003 11:41:48 +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 199MB7-0000L0-00 for gnu-help-gnu-emacs@m.gmane.org; Sat, 26 Apr 2003 05:41:05 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!feed.news.nacamar.de!fu-berlin.de!uni-berlin.de!dialin-145-254-194-010.arcor-ip.NET!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 35 Original-NNTP-Posting-Host: dialin-145-254-194-010.arcor-ip.net (145.254.194.10) Original-X-Trace: fu-berlin.de 1051349887 9458956 145.254.194.10 (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.090019 (Oort Gnus v0.19) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:UpJmF8vGTUJka1QZ629UzbW6jmc= Original-Xref: shelby.stanford.edu gnu.emacs.help:112355 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:8853 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:8853 Oliver Lohmann writes: > Hello, > > i've got a problem with making useful > skeletons/abbrevs: > > i.e. i define the following function/skeleton-construct: > ;;=== > (defun myFor(s1 s2 s3) > (interactive "sSet Var: \nsSet BreakCondition: \nsSet Incr: ") > (skeleton-insert'(nil > >"for(" s1 ";" s2 ";" s3 ")" "{" \n > > _ \n > > "}" \n > ))) > ;;=== Use `define-skeleton' instead: (define-skeleton my-for "Insert the skeleton for a for-loop." >"for(" (skeleton-read "Set Var: ") ";" (skeleton-read "Set BreakCondition: ") ";" (skeleton-read "Set Incr: ") ")" "{" \n > _ \n > "}" \n) (define-abbrev c-mode-abbrev-table "ffor" "" 'my-for) Oliver -- 6 Floréal an 211 de la Révolution Liberté, Egalité, Fraternité!