"Stephen J. Turnbull" <stephen(a)xemacs.org> writes:
Because you've just written self-modifying code: that cons is
shared
with the _function definition_. Watch this:
(progn
(defun jmh-test-func ()
(let (tv)
(setq tv '((?a) (?b)))
(push "testme" (cdr (assoc ?a tv)))
tv))
(cl-prettyprint (symbol-function 'jmh-test-func))
(cl-prettyprint (jmh-test-func))
(cl-prettyprint (symbol-function 'jmh-test-func))
(cl-prettyprint (jmh-test-func))
(cl-prettyprint (symbol-function 'jmh-test-func))
(terpri)
)
Ah, it makes sense now. Thanks for the excellent example. (well, now
I know how to debug things like this in the future :) I guess that's
what I get for using forms with side-effects. ;)
Thanks for taking the time to explain...
--
Josh Huber