From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Martin Slouf Newsgroups: gmane.emacs.help Subject: optimal skeleton definition Date: Sun, 8 Jan 2006 18:34:48 +0100 Message-ID: <20060108173447.GD19057@barbucha.martin.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1136741723 8399 80.91.229.2 (8 Jan 2006 17:35:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 8 Jan 2006 17:35:23 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 08 18:35:22 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 1EveRs-0002wy-3X for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Jan 2006 18:35:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EveTj-0004FX-Vk for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Jan 2006 12:37:16 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EveTX-0004FL-11 for help-gnu-emacs@gnu.org; Sun, 08 Jan 2006 12:37:03 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EveTT-0004F5-UU for help-gnu-emacs@gnu.org; Sun, 08 Jan 2006 12:37:02 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EveTT-0004F2-Qv for help-gnu-emacs@gnu.org; Sun, 08 Jan 2006 12:36:59 -0500 Original-Received: from [84.242.95.145] (helo=barbucha.martin.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EveVb-0005jN-13 for help-gnu-emacs@gnu.org; Sun, 08 Jan 2006 12:39:11 -0500 Original-Received: from martin by barbucha.martin.net with local (Exim 3.36 #1 (Debian)) id 1EveRM-0007XF-00 for ; Sun, 08 Jan 2006 18:34:48 +0100 Original-To: help-gnu-emacs@gnu.org Content-Disposition: inline User-Agent: Mutt/1.5.11 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:32549 Archived-At: hi, 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? thanks. martin