This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [commit] Deprecate remaining STREQ uses
- From: "Eli Zaretskii" <eliz at elta dot co dot il>
- To: Andrew Cagney <cagney at gnu dot org>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sat, 06 Dec 2003 17:22:51 +0200
- Subject: Re: [commit] Deprecate remaining STREQ uses
- References: <3FC119EB.1060102@gnu.org> <ufzgee29u.fsf@elta.co.il> <3FC234C0.1000500@gnu.org> <2914-Mon24Nov2003212333+0200-eliz@elta.co.il> <yf2r7zxy1j3.fsf@hawaii.kealia.com> <uznelos2i.fsf@elta.co.il> <3FD0B1B8.4030807@gnu.org> <7137-Fri05Dec2003195510+0200-eliz@elta.co.il> <3FD1E2F9.30009@gnu.org>
- Reply-to: Eli Zaretskii <eliz at elta dot co dot il>
> Date: Sat, 06 Dec 2003 09:08:57 -0500
> From: Andrew Cagney <cagney@gnu.org>
> >
> > Expand C macros in the region, using the C preprocessor.
> > Normally display output in temp buffer, but
> > prefix arg means replace the region with it.
> >
> > Note the last sentence: it means that "C-u M-x c-macro-expand RET"
> > will replace the marked region with the results of the expansion.
>
> I found the documentation (needed it to set the variable that makes it
> prompt for the command arguments, and set the CPP to run :-) but could
> make neither head nor tails out of "prefix arg".
The index search in the manual is your friend in such cases. Once
you look at the Emacs manual in the *info* buffer, type the following
words of wisdom:
i prefix arg RET
and you will land on the right section of the manual.
(The `i' command uses the index entries produced by @cindex, @findex
and the like. Given a good indexing job, this command is IMHO the
most efficient method of getting to the information you need. Perhaps
now you will better understand why I always ask for good index entries
for any new terminology added to the GDB manual. ;-)
> #define A(B,C) ((B) + (C))
> A(b,c)
>
> into
>
> ( ( b ) + ( c ) )
Ah, in that case indenting will not help. But something like
replacing all occurences of "( " with "(" and " )" with ")" should do
most of the work, I think. Press `!', the exclam mark, when Emacs
asks for confirmation of the first replacement, and it will do the
rest of the replacements automatically without asking.