Kevin Rodgers schrieb:
Marc Tfardy wrote:
 > I have a set of named macros. With apply-macro-to-region-lines command
 > I can apply last defined macro to each line of region. How can
 > I apply a named macro to region, except I define a "wrapper macro"
 > with C-x ( macro name C-x )? Any ideas?

Advise it to read a macro name (when preceded by C-u):

(defadvice apply-macro-to-region-lines (before read-named-macro activate)
"With a prefix arg, read a named macro to apply (instead of the last macro)."
  (interactive
   (list (region-beginning)
         (region-end)
         (if current-prefix-arg
             (read-command "Name of keyboard macro to apply: ")))))

BTW, frequent users of apply-macro-to-region-lines might like this:
(global-set-key "\C-xE" 'apply-macro-to-region-lines)

It works! Thanks a lot!

regards

Marc



_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Reply via email to