help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Replace whole words?


From: Rob Thorpe
Subject: Re: Replace whole words?
Date: 1 Sep 2003 06:19:58 -0700

bojohan+news@dd.chalmers.se (Johan Bockgård) wrote in message 
news:<yoij3cfiha9c.fsf@frealaf.dd.chalmers.se>...
> dum dee dee dum <xjkljasdfi@yahoo.org> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]