Re: [RFC PATCH v1 0/1] Avoid accidentally overwriting macro recording

Charles Mirabile <[email protected]> Sat, 14 Feb 2026 11:40:49 -0500
Newsgroups gmane.editors.nano.devel
Message-ID <CABe3_aFDYbjg4WXW9ask43O8JmkbLPMvnxiQqbyX9+hAft7JiA@mail.gmail.com>
Hi Benno—

On Sat, Feb 14, 2026 at 10:58 AM Benno Schulenberg <[email protected]> wrote:
>
>
> > I personally love this change, I have accidentally overrode macros plenty of
> > times. Accidentally running a destructive macro can usually be undone,
>
> Well, with "destructive" I meant a macro that does something that cannot
> be undone, like writing stuff out to a file.  (Of course, that file could
> be under version control, but it's not nano that can undo those changes.)
>
> > but there's isn't really a way to get a macro back.
>
> Yeah.  I guess that point weighs more heavily.  And when the user wants to
> clear a dangerous macro, it is easy enough to overwrite it with something
> innocuous, like M-D or toggling something twice.
>
> So... a cleaned up patch is attached.  Is it okay with you, Charles?

I confirmed that it works as expected locally, so it looks good to me.
I agree it is nice to avoid the nesting of the conditionals.

>
>
> Benno
>

Best—Charlie