[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug



;;; dynamic binding of *special* is messed up when 
;;; creating structure under (with-open...)

(defvar *special* nil)

(defstruct base
  one)

(defstruct (derived (:include base) (:print-function print-two))
  two)

(defun print-two (node stream depth)
  (princ *special*)
  (princ " here"))


(setq xx 
      (with-open-file (foo "/dev/null")
		      (make-derived)))


(setq yy (with-open-file (foo (open "/dev/null"))(make-derived)))


;;; this function should print "T here" but prints "NIL here"
(defun funx () (let ((*special* t)) xx))

(defun funy () (let ((*special* t)) yy))