unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Mohitz <coolmohitz@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: emacs function for writing C++ iterator loop
Date: Thu, 28 Jun 2007 23:35:37 -0700	[thread overview]
Message-ID: <1183098937.627370.109140@u2g2000hsc.googlegroups.com> (raw)
In-Reply-To: <1183087377.597961.146510@n60g2000hse.googlegroups.com>

> Hi
> This is probably a good starting point:http://www.emacswiki.org/cgi-bin/wiki/SkeletonMode
> Cheers,

Thank you so much... Got it working :)

I would post the solution in case it benefits someone else..

(define-skeleton generate-iterator-loop
      "Generate Iterator Loop"
      ""
      > (setq v1 (skeleton-read "Iterate on? ")) "<"
      > (setq v4 (skeleton-read "Class Name? ")) "> "
      > (setq v2 (skeleton-read "Var Name? ")) " = "
      > (setq v3 (skeleton-read "Points to? ")) ";" \n
      > v1 "<" v4 ">::iterator " v2 "Iterate;" \n
      > v2 "Iterate = " v2 ".begin();" \n
      > "while (" v2 "Iterate != " v2  ".end())" \n
      > "{" \n
      > v4 " temp" v4 ";" \n
      > "temp" v4 " = *" v2 "Iterate;" \n
      > "//Do something with temp" v4 \n
      > v2 "Iterate++;" \n
      > "}" \n)

  reply	other threads:[~2007-06-29  6:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-29  0:56 emacs function for writing C++ iterator loop Mohitz
2007-06-29  3:22 ` weber
2007-06-29  6:35   ` Mohitz [this message]
2007-06-29  7:31     ` Pascal Bourguignon
2007-06-29  7:09 ` Pascal Bourguignon

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=1183098937.627370.109140@u2g2000hsc.googlegroups.com \
    --to=coolmohitz@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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).