From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: 2QdxY4RzWzUUiLuE@potatochowder.com Newsgroups: gmane.emacs.help Subject: Re: Looking for some examples Date: Wed, 6 Oct 2021 13:47:44 -0700 Message-ID: <YV4LcKyvzC+ieY0q@scrozzle> References: <CAFDHx1Jwct5an3vZwGrk4GA3kC0C8OUxsRNkZ+UoEW4EShDXQw@mail.gmail.com> <87a6jlopww.fsf@rub.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29820"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 06 22:49:03 2021 Return-path: <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org> Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org>) id 1mYDqZ-0007ca-KQ for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 06 Oct 2021 22:49:03 +0200 Original-Received: from localhost ([::1]:56184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org>) id 1mYDqY-0007dn-Ii for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 06 Oct 2021 16:49:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35936) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <2QdxY4RzWzUUiLuE@potatochowder.com>) id 1mYDpX-0007cG-6B for help-gnu-emacs@gnu.org; Wed, 06 Oct 2021 16:47:59 -0400 Original-Received: from www458.your-server.de ([136.243.165.62]:58552) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <2QdxY4RzWzUUiLuE@potatochowder.com>) id 1mYDpV-00058E-DY for help-gnu-emacs@gnu.org; Wed, 06 Oct 2021 16:47:58 -0400 Original-Received: from sslproxy03.your-server.de ([88.198.220.132]) by www458.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from <2QdxY4RzWzUUiLuE@potatochowder.com>) id 1mYDpO-0009GC-RM for help-gnu-emacs@gnu.org; Wed, 06 Oct 2021 22:47:50 +0200 Original-Received: from [2607:fb90:fc5:480e:8978:1d31:85c:b5bc] (helo=localhost) by sslproxy03.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <2QdxY4RzWzUUiLuE@potatochowder.com>) id 1mYDpN-0002ZX-IT for help-gnu-emacs@gnu.org; Wed, 06 Oct 2021 22:47:50 +0200 Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <87a6jlopww.fsf@rub.de> X-Authenticated-Sender: 2QdxY4RzWzUUiLuE@potatochowder.com X-Virus-Scanned: Clear (ClamAV 0.103.3/26314/Wed Oct 6 11:04:35 2021) Received-SPF: pass client-ip=136.243.165.62; envelope-from=2QdxY4RzWzUUiLuE@potatochowder.com; helo=www458.your-server.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/help-gnu-emacs>, <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/help-gnu-emacs> List-Post: <mailto:help-gnu-emacs@gnu.org> List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/help-gnu-emacs>, <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe> Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org> Xref: news.gmane.io gmane.emacs.help:133625 Archived-At: <http://permalink.gmane.org/gmane.emacs.help/133625> On 2021-10-06 at 22:32:15 +0200, Stephen Berman <stephen.berman@gmx.net> wrote: > On Wed, 6 Oct 2021 12:30:40 -0700 Patrick Mahan <plmahan@gmail.com> wrote: > > > I've looked around on the wiki and googled, but I haven't really found any > > examples. > > > > I am cleaning a bunch of old code with tons of CPP macros of the form - > > #define MACRONAME(_arg1, _arg2) \ > > do { \ > > /* code */ \ > > } while (0) > > > > I am converting these all to inline functions and already have some emacs > > lisp code written to handle converting everything but the backslashes. I > > would like to remove the backslashes, but I do not want to leave all that > > empty whitespace behind. Is there a way to do this using > > query-replace-regexp that also removes the whitespace? > > C-M-% [[:space:]]+\\$ RET RET ! That won't remove the backslashes that *aren't* preceded by whitespace, which may or may not be a problem in your case. To address that, change the + (one or more) to a * (zero or more): C-M-% [[:space:]]*\\$ RET RET !