[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

[21.5] bytecomp bug


The combination of the `lexical-let' macro and the `labels' macro
produces the `(quote lambda)' element in its expanded form as
the case may be, and the most recent bytecomp got to fail with it.
Here is an example:

(defun test (&optional msg)
  (lexical-let ((default "Hello World!"))
    (labels ((fn (&optional arg)
		 (message "%s" (or msg default))))
      (fn msg))))

It works, however it cannot be byte-compiled as follows:

(byte-compile 'test)
 => !! error (("not a lambda -- (quote lambda)"))

Whereas the version of XEmacs 21.4.22 does.  The example above
is a simplified extract of the `w3m-process-do-with-temp-buffer'
macro that emacs-w3m uses; I'm unable to build and install it
for XEmacs 21.5-b31 nowadays because of such errors.  You can see
the expanded form of `test' by:

(progn (pp (macroexpand
 '(lexical-let ((default "Hello World!"))
    (labels ((fn (&optional arg)
		 (message "%s" (or msg default))))
      (fn msg)))
 )) nil)