unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: weber <hugows@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: emacs function for writing C++ iterator loop
Date: Fri, 29 Jun 2007 03:22:57 -0000	[thread overview]
Message-ID: <1183087377.597961.146510@n60g2000hse.googlegroups.com> (raw)
In-Reply-To: <1183078606.107965.201180@o61g2000hsh.googlegroups.com>

On 28 jun, 21:56, Mohitz <coolmoh...@gmail.com> wrote:
> I program in C++ using emacs. And i tend to use the C++ iterator a
> lot. Now, whenever I want to iterate I always write almost the same
> kinda code. So, i want to write a emacs function so that emacs does
> that for me.
>
> For example
>
> If i tell emacs that i am iterating on a "deque<ClassName> " variable
> with variable name "var" pointing to
> "someThing", Emacs should potentially be able to generate the
> following
>
> deque<CLassName> var = someThing;
> deque<ClassName>::iterator varIterate;
> varIterate = var.begin();
> while (varIterate != var.end())
> {
>       ClassName tempClassName;
>       tempClassName = *varIterate;
>
>       //Do something with tempClassName
>
>       varIterate++;
>
> }
>
> Any kind of help or pointers to help material would be greatly
> appreciated
>
> Thanks
> Mohit

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

  reply	other threads:[~2007-06-29  3:22 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 [this message]
2007-06-29  6:35   ` Mohitz
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=1183087377.597961.146510@n60g2000hse.googlegroups.com \
    --to=hugows@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).