From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14143 invoked by alias); 5 Dec 2003 17:56:13 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 14135 invoked from network); 5 Dec 2003 17:56:11 -0000 Received: from unknown (HELO aragorn.inter.net.il) (192.114.186.23) by sources.redhat.com with SMTP; 5 Dec 2003 17:56:11 -0000 Received: from zaretski ([80.230.147.167]) by aragorn.inter.net.il (Mirapoint Messaging Server MOS 3.3.8-GR) with ESMTP id CAG23943; Fri, 5 Dec 2003 19:56:02 +0200 (IST) Date: Fri, 05 Dec 2003 17:56:00 -0000 From: "Eli Zaretskii" To: Andrew Cagney Message-Id: <7137-Fri05Dec2003195510+0200-eliz@elta.co.il> CC: gdb-patches@sources.redhat.com In-reply-to: <3FD0B1B8.4030807@gnu.org> (message from Andrew Cagney on Fri, 05 Dec 2003 11:26:32 -0500) Subject: Re: [commit] Deprecate remaining STREQ uses Reply-to: Eli Zaretskii References: <3FC119EB.1060102@gnu.org> <3FC234C0.1000500@gnu.org> <2914-Mon24Nov2003212333+0200-eliz@elta.co.il> <3FD0B1B8.4030807@gnu.org> X-SW-Source: 2003-12/txt/msg00219.txt.bz2 > Date: Fri, 05 Dec 2003 11:26:32 -0500 > From: Andrew Cagney > > 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-\".