From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: Apply macro to region Date: Thu, 21 Jul 2005 17:08:23 -0600 Message-ID: References: <3ka440Ft74qmU1@individual.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1121988407 9612 80.91.229.2 (21 Jul 2005 23:26:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 21 Jul 2005 23:26:47 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 22 01:26:45 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DvkQi-0008EM-D5 for geh-help-gnu-emacs@m.gmane.org; Fri, 22 Jul 2005 01:26:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DvkSp-0007ho-Br for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Jul 2005 19:28:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DvkQ7-0006pF-OH for help-gnu-emacs@gnu.org; Thu, 21 Jul 2005 19:25:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DvkQ4-0006ns-Af for help-gnu-emacs@gnu.org; Thu, 21 Jul 2005 19:25:37 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DvkQ2-0006ho-Mw for help-gnu-emacs@gnu.org; Thu, 21 Jul 2005 19:25:35 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1DvkLL-00056Q-W0 for help-gnu-emacs@gnu.org; Thu, 21 Jul 2005 19:20:44 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DvkAp-00070w-In for help-gnu-emacs@gnu.org; Fri, 22 Jul 2005 01:09:51 +0200 Original-Received: from 207.167.42.60 ([207.167.42.60]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 Jul 2005 01:09:51 +0200 Original-Received: from ihs_4664 by 207.167.42.60 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 Jul 2005 01:09:51 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 22 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207.167.42.60 User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en In-Reply-To: <3ka440Ft74qmU1@individual.net> X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:28076 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:28076 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) -- Kevin Rodgers