From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: robert.thorpe@antenova.com (Rob Thorpe) Newsgroups: gmane.emacs.help Subject: Re: Replace whole words? Date: 1 Sep 2003 06:19:58 -0700 Organization: http://groups.google.com/ Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <1a61f7e5.0309010519.67ab9396@posting.google.com> References: NNTP-Posting-Host: deer.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1062518899 6324 80.91.224.253 (2 Sep 2003 16:08:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 2 Sep 2003 16:08:19 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 02 18:08:17 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19uDhY-0006l0-00 for ; Tue, 02 Sep 2003 18:08:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 19u5vr-0006Kg-95 for geh-help-gnu-emacs@m.gmane.org; Tue, 02 Sep 2003 03:50:31 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews1.google.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 26 Original-NNTP-Posting-Host: 212.135.40.163 Original-X-Trace: posting.google.com 1062422399 15110 127.0.0.1 (1 Sep 2003 13:19:59 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: 1 Sep 2003 13:19:59 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:116307 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 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:12227 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:12227 bojohan+news@dd.chalmers.se (Johan Bockgård) wrote in message news:... > dum dee dee dum writes: > > > I have written a fairly long program, but I now want to find and > > replace all the 'int' s in the program to double as easily as > > possible. But I don't want the other words, variable names, etc. in > > the program that have 'int' in them (internationalization, for > > example) to change. Any ideas? M-% is an option > > C-u M-% > > [...] > Third arg DELIMITED (prefix arg if interactive), if non-nil, means > replace only matches surrounded by word boundaries. If I were you I would do it the way Jesper suggests, but I would replace it with another term, say num_type. Then put at the top something like ttn suggests :- #define num_type int; /* #define num_type double; */ (Or use typedef.) This allows you to change things easily. I've often done this in the past to allow me to experiment with using doubles and floats.