Subject: Re: bug#13605: 24.3.50; Eager macro-expansion failure: (void-variable ruby-syntax-methods-before-regexp) when ruby-mode is not compiled

From: Dmitry Gutov <[email-masked]>
Date: Sat, 02 Feb 2013 14:07:46 +0400

On 02.02.2013 3:30, Stefan Monnier wrote:
>> The constant in question is defined in an `eval-and-compile' block, I
>> can't see what else could the interpreter need. Help?
>
> Eager macro expansion works at the granularity of top-level expressions,
> so the whole (if (eval-when-compile (fboundp #'syntax-propertize-rules)) ...)
> block is macro-expanded before it gets run.
>
> The patch below should work around the problem (probably best option
> for emacs-24).

The patch works fine, thank you, but looks like it's not for emacs-24 
anyway.

> Maybe the better way to fix it (for trunk) is to change eval-and-compile
> (and probably eval-when-compile) so that it evaluates its argument during
> macro-expansion.

Sounds good.
Do I install the patch (after fixing indentation), or wait for the 
better fix?