>>>> In <m3ekx39v4i.fsf(a)zion.rcn.com>
>>>> Vin Shelton <acs(a)xemacs.org> wrote:
Katsumi Yamaoka <yamaoka(a)jpl.org> writes:
> (let ((buffer-1 (generate-new-buffer "*test-1*"))
> (buffer-2 (generate-new-buffer "*test-2*")))
> (makunbound 'testing-whether-this-variable-is-bound-globally)
> (save-excursion
> (set-buffer buffer-1)
> (make-local-variable 'testing-whether-this-variable-is-bound-globally)
> (let (testing-whether-this-variable-is-bound-globally)
> (save-excursion
> (set-buffer buffer-2)
> (setq testing-whether-this-variable-is-bound-globally "Howl!")
> )))
> (kill-buffer buffer-1)
> (kill-buffer buffer-2)
>
> testing-whether-this-variable-is-bound-globally)
I see exactly the same behavior on emacs-21.3.50 (latest CVS) as I
do
in XEmacs 21.4 and 21.5. ^X^E evaluates to "Howl!" in each case.
Oops, that's sure. I found it while looking into Norbert Koch's
`to-address' problem in Gnus.
What did you expect to happen?
Since the symbol variable is enclosed with the let binding and
it should not exist in that buffer, I believed it should not be
bound globally as follows:
(progn
(makunbound 'foobarbaz)
(let (foobarbaz)
(setq foobarbaz t))
(boundp 'foobarbaz))
=> nil
Probably, what I can only say is that we should be careful not
to make codes like that. Anyway, thanks for your following up.
--
Katsumi Yamaoka <yamaoka(a)jpl.org>