From: Patrick Drechsler <patrick@pdrechsler.de>
To: help-gnu-emacs@gnu.org
Subject: Re: keyboard macro create function from list
Date: Sat, 09 Jun 2007 09:54:58 +0200 [thread overview]
Message-ID: <87fy51imul.fsf@pdrechsler.de> (raw)
In-Reply-To: u3b13v9tl.fsf@gmail.com
Peter Lee <pete.a.lee@gmail.com> writes:
> You could use a regexp...
>
> (defun name-me ()
> (interactive)
> (when mark-active
> (replace-regexp "myvar_\\(.*\\) *" "m_\\1.SetBounds(0, 0, m_\\1.Width, m_\\1.Height)\nm_\\1.Show()\nSplitContainer.Panel2.Controls.Add(m_\\1)\n" nil (region-beginning) (region-end))
> ))
>
> Paste your var declarations..
>
> myvar_Asometext
> myvar_B1foo
>
> Select them in a region... and run M-x name-me
Very nice, thanks a lot Peter!
Cheers,
Patrick
--
"Science knows only one commandment: contribute to science."
-- Bertolt Brecht, "Galileo".
prev parent reply other threads:[~2007-06-09 7:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-07 0:18 keyboard macro create function from list Patrick Drechsler
2007-06-07 19:33 ` Peter Lee
2007-06-09 7:54 ` Patrick Drechsler [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=87fy51imul.fsf@pdrechsler.de \
--to=patrick@pdrechsler.de \
--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).