From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kai Grossjohann Newsgroups: gmane.emacs.help Subject: Re: Regexp Query/Replace Without Trashing Original Text Date: Sun, 01 Aug 2004 15:15:53 +0200 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <86hdrnc83a.fsf@ketchup.de.uu.net> References: <1091270054.672720@sj-nntpcache-5> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1091366208 17122 80.91.224.253 (1 Aug 2004 13:16:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 1 Aug 2004 13:16:48 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Aug 01 15:16:43 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BrGCh-0003K6-00 for ; Sun, 01 Aug 2004 15:16:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BrGG2-0005zU-Ir for geh-help-gnu-emacs@m.gmane.org; Sun, 01 Aug 2004 09:20:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BrGFo-0005zO-Tm for help-gnu-emacs@gnu.org; Sun, 01 Aug 2004 09:19:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BrGFn-0005y6-EV for help-gnu-emacs@gnu.org; Sun, 01 Aug 2004 09:19:56 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BrGFn-0005xz-C0 for help-gnu-emacs@gnu.org; Sun, 01 Aug 2004 09:19:55 -0400 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BrGBy-0005vD-BB for help-gnu-emacs@gnu.org; Sun, 01 Aug 2004 09:15:58 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BrGBw-0003j0-00 for ; Sun, 01 Aug 2004 15:15:56 +0200 Original-Received: from pd951fbb6.dip.t-dialin.net ([217.81.251.182]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 01 Aug 2004 15:15:56 +0200 Original-Received: from kai by pd951fbb6.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 01 Aug 2004 15:15:56 +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: pd951fbb6.dip.t-dialin.net User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:8PROr5ZBS+us8+gUNTivO0qwb8Y= 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: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:19912 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:19912 "Tennis Smith" writes: > How can I convert something like this > > $GLOBAL_VAR > > to this: > > $global_array(GLOBAL_VAR) > > ?? I presume it's variables starting with an uppercase letter. You can make a kbd macro for this. C-x ( starts recording, C-x ) ends recording. In the macro, search for $ followed by an uppercase letter. Then move point to after the $, then insert "global_array(", then use M-f or C-M-f to skip forward over the variable name, then insert the closing parenthesis. Kbd macros are your friends. Kai