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
next prev parent 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
* 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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.