[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Electricity in keyboard macros

From: Kevin Rodgers
Subject: Re: Electricity in keyboard macros
Date: Mon, 13 Aug 2001 10:21:45 -0600

"Christopher S. Kush" wrote:
> No way.  You have to pick one -- you're not President Bush, you
> know.  Since commands are allowed (nay, encouraged!) to behave
> differently as part of a keyboard macro, what specifically is
> unreasonable about asking that
>  o 0 ( C-x b *scratch*<RET>M-x c-mode<RET>C-h b }C-x b<RET> )
> c-electric-brace do this very thing, i.e. shut up when invoked
> from a macro?

There's nothing unreasonable about that.  And one of the great things about
Emacs is that you can customize it to get the behavior you want:

(defadvice c-electric-brace (around executing-macro activate)
  "Simply call `self-insert-command' when invoked by a keyboard macro."
  (if executing-macro
      (self-insert-command (prefix-numeric-value current-prefix-arg))

> Okay, let me answer my own question -- in the case the OP
> described, it would be nice -- no ten-minute delays while C-u 100
> C-x e works its magic.  OTOH, suppose you have to update 17
> similar expressions in a C program.  You record a kbd-macro, then
> one by one find each target and C-x e.  The electric-flash gives
> you a warm fuzzy feeling that the macro really worked.

Kevin Rodgers <kevinr@ihs.com>          Lead Software Engineer
Information Handling Services           Electronic Systems Development
15 Inverness Way East, M/S A114         GO BUFFS!
Englewood CO 80112-5776 USA             303-397-2807[voice]/705-4258[fax]

reply via email to

[Prev in Thread] Current Thread [Next in Thread]