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

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

Re: Looking for some examples


From: Stephen Berman
Subject: Re: Looking for some examples
Date: Wed, 06 Oct 2021 22:32:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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 !

Steve Berman



reply via email to

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