From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: optimal skeleton definition Date: Sun, 08 Jan 2006 23:07:13 -0500 Organization: Bell Sympatico Message-ID: <87y81qjb9y.fsf-monnier+gnu.emacs.help@gnu.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1136780627 19989 80.91.229.2 (9 Jan 2006 04:23:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 9 Jan 2006 04:23:47 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 09 05:23:45 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EvoZK-0004aI-UH for geh-help-gnu-emacs@m.gmane.org; Mon, 09 Jan 2006 05:23:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EvobF-0000TV-FW for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Jan 2006 23:25:41 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!nf3.bellglobal.com!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:McfFu6Pe5X57UsF49mRLkHkbuTI= Original-Lines: 32 Original-NNTP-Posting-Host: 67.71.26.73 Original-X-Complaints-To: abuse@sympatico.ca Original-X-Trace: news20.bellglobal.com 1136779634 67.71.26.73 (Sun, 08 Jan 2006 23:07:14 EST) Original-NNTP-Posting-Date: Sun, 08 Jan 2006 23:07:14 EST Original-Xref: shelby.stanford.edu gnu.emacs.help:136934 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:32553 Archived-At: > being not an elisp expert i wrote this kind of skeleton to simplify my java > getter/setter generation, which is later bound to some abbrev to be expanded > automatically. > - - - - > (define-skeleton java-getter-setter > "inserts java getter/setter pair" > nil (setq v1 (skeleton-read "Input Java type: ")) > nil (setq v2 (skeleton-read "Input property name: ")) > (setq method-part-name (concat (upcase (substring v2 0 1)) (substring v2 1))) > nil >"public " v1 " get" method-part-name "() {"?\n >> "return this." v2 ";"?\n > "}">""?\n\n >> "public void set" method-part-name "(" v1 " " v2 ") {"?\n >> "this." v2 " = " v2 ";"?\n > "}">) > - - - - > the problem of the code above is, that (setq ...) functions always return > a value and that value is printed into a buffer. Is there a chance not to > print the value of the setq s-expression to the buffer? Quote your setq. I.e. use '(setq foo bar) instead of (setq foo bar) -- Stefan