Re: [PATCH 1/2] test-lib-emacs: re-define test_emacs() after initialization

Subject:Re: [PATCH 1/2] test-lib-emacs: re-define test_emacs() after initialization

Date:Sat, 26 Jun 2021 09:31:49 -0300

To:Tomi Ollila ,notmuch@notmuchmail.org

Cc:tomi.ollila@iki.fi

From:David Bremner


Tomi Ollila <tomi.ollila@iki.fi> writes:

> After test_emacs() has started emacs, it re-defines
> itself as just calling the started emacs.
>
> First call to test_emacs() will execute to the end of it;
> next calls will just execute the 2 lines, first clearing OUTPUT,
> second and last executing TEST_EMACSCLIENT...
>
> This simplifies away one if constructs and reduces xtrace
> output when doing test debugging with set -x.

Although I am slightly horrified to learn that bash functions can
redefine themselves, I guess I can live with this if it is useful. It's
not like checking an environment variable is such a pretty construct.
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: