[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#7145: elisp-code behaves differently after byte-compilation
From: |
Johan Bockgård |
Subject: |
bug#7145: elisp-code behaves differently after byte-compilation |
Date: |
Sat, 02 Oct 2010 12:41:18 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Andreas Schwab <schwab@linux-m68k.org> writes:
> "Markus Sauermann" <mhoram@gmx.de> writes:
>
>> The following code however shows a case where this is not the case.
>>
>> --- BEGIN CODE ---
>> (let ((fun (lambda () (let ((bar "foo")
>> (baz "foo"))
>> (eq bar baz)))))
>> (list (funcall (byte-compile fun))
>> (funcall fun)))
>> --- END CODE---
>>
>> Evaluation this code (don't try to byte-compile it, because it is buggy ;-)
>> ) results in:
>>
>> --- BEGIN OUTPUT ---
>> (t nil)
>> --- END OUTPUT ---
>
> This is not a bug.
But this is, IMO:
(progn
(defsubst spooky-action-at-a-distance ()
(let ((a (concat "a" "bc")))
(store-substring a 0 "123")))
(defun foo ()
(spooky-action-at-a-distance)
(concat "ab" "c"))
(byte-compile 'foo)
(foo))
=> "123"