help-gnu-emacs
[Top][All Lists]
Advanced

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

electricity in keyboard macros


From: Fabrice Bauzac
Subject: electricity in keyboard macros
Date: Thu, 26 Jul 2001 23:55:44 +0200
User-agent: Mutt/1.3.18i

Hello,

I'll introduce my problem in a small example.  Create a C file (for
example "foo.c") with these contents:

struct pair thing[] = {
  val, val,
  val, val,
  val, val,
  val, val,
  val, val,
  val, val,
  val, val,
  val, val
};

Now I want to convert it into the more structural form

struct pair thing[] = {
  { val, val },
  { val, val },
  ...
};

So I use a keyboard macro:

(setq last-kbd-macro
   "\C-a\C-f\C-f{ \C-e\C-? },\C-a\C-n")

It works, but the problem is that each time the macro inserts an
(electric) '}', the point temporarily shows the matching '{' during
one second.  Imagine a case when you have to repeat the macro 60
times: it will last one minute.

I think the electric code should test for the `executing-macro'
variable before waiting one second...

Am I wrong?
-- 
Fabrice Bauzac
Software should be free.



reply via email to

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