Subject: Re: bug#65102: 30.0.50; `byte-recompile-directory' ignores every file

From: Michael Heerdegen <[email-masked]>
Date: Sun, 06 Aug 2023 06:08:24 +0200

Wing Hei Chan <[email-masked]> writes:

> The `ignore-files-regexp' in `byte-recompile-directory' is bound to the
> result of (mapconcat #'identity byte-compile-ignore-files "\\|"),
> which is simply an empty string when `byte-compile-ignore-files' is
> empty.  In turn, this causes every file to be ignored, since
> `string-match-p' matches every string when given an empty regexp.

Indeed (to reproduce one has to make sure that one tries a call where
files are actually expected to be compiled, and even in this case
nothing is done - thanks for finding this!).

We probably should use regexp-unmatchable instead of an empty string
when the option is nil.

Do we also need to wrap the regexps into shy groups, or something else?

Thx,
Michael.