Calling macros inside macros in Emacs
I don't know how to call a macro inside another macro avoiding the ring bell stop of the inner macro, because that stops the external macro. In particular, I have 开发者_StackOverflow中文版to make two searches , and I've defined one in one macro and the other have to search some folders and call in each folder the inner macro, but the external macro cannot continue after the ring bell stop of the inner macro.
Any solution?
Thanks!
There is probably a way to do it by modifying or studying the behavior of isearch, but your best bet is to write the inner loop in Lisp and run the outer loop as a macro (or write it in Lisp as well). The macro system is great, but it is limited in power, and it sounds like you are trying to do something more powerful than it can handle (easily).
Depending on what you are doing, you may also be able to use Lisp expressions in the replacement string of a regexp replace. Starting with GNU Emacs 22, you can use Lisp expressions in the replacement string by escaping them with "\,".
I'm sure there is a way to achieve what you asked (it is Emacs, after all), but it is probably more trouble than it is worth.
I Finally found a solution for this :
I have a macro 'a1' that calls macro 'etat' till an error is found (with C-u 0)
(fset 'a1
[escape ?< ?\C-u ?0 escape ?x ?e ?t ?a ?t return ])
macro etat :
(fset 'etat
[?\C-s ?I ?n ?i ?t ?i ?a ?l ? ?S ?t ?a ?t ?e C-right C-left ?\C- ?\C-a ?\C-w ?< ?e ?t ?a ?t ?> return ?\C-s ?( left backspace ?\C-k ?\C-a ?\C-s ?I ?n ?i ?t ?i ?a ?l ? ?S ?t ?a ?t ?e ?\C-a return up ?< ?/ ?e ?t ?a ?t ?> ?\C-a down])
精彩评论