From: Martin Slouf <mar@centrum.cz>
Subject: Re: optimal skeleton definition: solved
Date: Mon, 9 Jan 2006 16:49:54 +0100 [thread overview]
Message-ID: <20060109154953.GA7838@barbucha.martin.net> (raw)
In-Reply-To: <87y81qjb9y.fsf-monnier+gnu.emacs.help@gnu.org>
thanks a lot. m.
On Sun, Jan 08, 2006 at 11:07:13PM -0500, Stefan Monnier wrote:
> > 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
> _______________________________________________
> help-gnu-emacs mailing list
> help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
prev parent reply other threads:[~2006-01-09 15:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.359.1136741825.26925.help-gnu-emacs@gnu.org>
2006-01-09 4:07 ` optimal skeleton definition Stefan Monnier
2006-01-09 15:49 ` Martin Slouf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060109154953.GA7838@barbucha.martin.net \
--to=mar@centrum.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).