[commit] Deprecate remaining STREQ uses
Eli Zaretskii
eliz@elta.co.il
Fri Dec 5 17:56:00 GMT 2003
> Date: Fri, 05 Dec 2003 11:26:32 -0500
> From: Andrew Cagney <cagney@gnu.org>
>
> Is there a way, in EMACS, to pipe a section of code through a shell and
> then have that code re-inserted in place?
There's a way in Emacs to do everything (well, perhaps except a cup
of coffee ;-).
You want "C-u M-|", I think. See the doc string of
shell-command-on-region (bound to M-|) for more details.
> I've played with c-macro-expand but found the experience less than
> satisfying. The text ends up in a separate window leaving me with an
> additional messy cut/paste step.
It sounds like you missed the documentation of c-macro-expand, which
says:
c-macro-expand is an interactive autoloaded Lisp function in `cmacexp'.
(c-macro-expand START END SUBST)
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.
> PS: Steps will likely be:
>
> - change streq[n] to sane equivalents
> - re-indent rougly half of GDB
> the output of cpp is messy, I'm going to need to re-indent it, which
> means I'm going to need to re-indent befor the event
> - this to-be-determined step
For reindenting, just mark the region and then type "C-M-\".
More information about the Gdb-patches
mailing list