GNU bug report logs -
#13605
24.3.50; Eager macro-expansion failure: (void-variable ruby-syntax-methods-before-regexp) when ruby-mode is not compiled
Previous Next
Reported by: Dmitry Gutov <dgutov <at> yandex.ru>
Date: Fri, 1 Feb 2013 21:37:02 UTC
Severity: normal
Found in version 24.3.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
Message #22 received at 13605-done <at> debbugs.gnu.org (full text, mbox):
>>> 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.
I've installed the patch below which fixes this problem and hopefully
won't introduce others.
Stefan
=== modified file 'lisp/emacs-lisp/byte-run.el'
--- lisp/emacs-lisp/byte-run.el 2013-01-03 02:37:57 +0000
+++ lisp/emacs-lisp/byte-run.el 2013-02-08 16:13:13 +0000
@@ -392,15 +392,15 @@
Thus, the result of the body appears to the compiler as a quoted constant.
In interpreted code, this is entirely equivalent to `progn'."
(declare (debug t) (indent 0))
- ;; Not necessary because we have it in b-c-initial-macro-environment
- ;; (list 'quote (eval (cons 'progn body)))
- (cons 'progn body))
+ (list 'quote (eval (cons 'progn body) lexical-binding)))
(defmacro eval-and-compile (&rest body)
"Like `progn', but evaluates the body at compile time and at load time."
(declare (debug t) (indent 0))
- ;; Remember, it's magic.
- (cons 'progn body))
+ ;; When the byte-compiler expands code, this macro is not used, so we're
+ ;; either about to run `body' (plain interpretation) or we're doing eager
+ ;; macroexpansion.
+ (list 'quote (eval (cons 'progn body) lexical-binding)))
(put 'with-no-warnings 'lisp-indent-function 0)
(defun with-no-warnings (&rest body)
This bug report was last modified 12 years and 108 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.