Subject: Re: bug#68929: [PATCH] Copy which-key from GNU ELPA into core

From: Jeremy Bryant <[email-masked]>
Date: Fri, 23 Feb 2024 23:07:24 +0000

Philip,

Going through your suggestions, progressing upstream.

Philip Kaludercic <[email-masked]> writes:
>> +(defvar which-key--ignore-keys-regexp
>> +  (eval-when-compile
>> +    (regexp-opt '("mouse-" "wheel-" "remap" "drag-" "scroll-bar"
>> +                  "select-window" "switch-frame" "-state"
>> +                  "which-key"))))
>
> regexp-opt is marked as pure, you don't need the eval-when-compile here.
>

Please clarify your request?

It would seem The manual has a similar example to the original code.  
(elisp) Eval During Compile

     If you have a constant that needs some calculation to produce,
     ‘eval-when-compile’ can do that at compile-time.  For example,

          (defvar my-regexp
            (eval-when-compile (regexp-opt '("aaa" "aba" "abb"))))

What am I missing?