[Bug: 21.4.21] Bad compilation of mapc+lambda+assoc

Stephen J. Turnbull turnbull at sk.tsukuba.ac.jp
Wed Dec 10 20:32:27 EST 2008


Jacques Duthen writes:

 > (defvar jd-bug-xemacs-01-alist '(("-" . "01")))
 > 
 > (defun jd-bug-xemacs-01 (file)
 >   (mapc
 >    (lambda (assoc)
 >        (setq file (concat file (car assoc) (cdr assoc))))
 >    jd-bug-xemacs-01-alist)
 >   file)
 > 
 > When I byte-compile/load this file, I get the following:
 > 
 > ELISP> (jd-bug-xemacs-01 "foo")
 > *** Eval error ***  Symbol's value as variable is void: old-assoc

I've reproduced this with both 21.4.21 and a fairly fresh XEmacs 21.5.

However, I'm not an expert on the byte-compiler, and I don't know that
any of the people who do understand it well are currently active.  You
should not expect this to get fixed in a hurry, since there's an easy
workaround available.

Steve





More information about the XEmacs-Beta mailing list