Bug report: local & setq, 9.9.6, Windows

Started by Kazimir Majorinc, October 09, 2008, 07:44:34 AM

Previous topic - Next topic

Kazimir Majorinc

(set 'f (lambda ()
           (local (e)
                  (setq e (map eval (args)))
                  (println "Disco! " (string? nil) "! Punk!"))))


(f "Rock'n'roll"); Disco! ("Rock'n'roll")! Punk!
http://kazimirmajorinc.com/\">WWW site; http://kazimirmajorinc.blogspot.com\">blog.

Lutz

#1
It's changing the value of nil when applying setf/setq on un-initialized locals defined using 'local'. This is fixed in 9.9.7. Thanks for catching this.



as a workaround use 'let' instead of 'local':


(set 'f (lambda ()
     (let (e)
           (setq e (map eval (args)))
           (println "Disco! " (string? nil) "! Punk!"))))

(f "Rock'n'roll") => Disco! nil! Punk!