[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#411: 23.0.60; flet and byte-compilation
From: |
Chong Yidong |
Subject: |
bug#411: 23.0.60; flet and byte-compilation |
Date: |
Wed, 24 Sep 2008 22:16:07 -0400 |
Glenn Morris <rgm@gnu.org> wrote:
> > (defun f (x y)
> > (flet ((+ (a b) (- a b)))
> > (+ x y)))
> >
> > Bytecompile it [...]
> >
> > Evaluate the expression (f 1 2). This should yield -1, but the result
> > will be 3.
>
> it works to comment out the line in bytecomp.el
>
> (byte-defop-compiler (+ byte-plus) byte-compile-associative)
>
> I guess byte-compile-associative mangles the '(+ x y) form without
> regard for the redefinition in effect. I don't know if that is
> fixable, or should be a documented caveat with regards to primitives.
I don't see how to fix this, and my inclination is to just document this
limitation in the docstring of `flet'. Stefan, WDYT?