Page 1 of 1
Bug report: local & setq, 9.9.6, Windows
Posted: Thu Oct 09, 2008 2:44 pm
by Kazimir Majorinc
Code: Select all
(set 'f (lambda ()
(local (e)
(setq e (map eval (args)))
(println "Disco! " (string? nil) "! Punk!"))))
(f "Rock'n'roll"); Disco! ("Rock'n'roll")! Punk!
Posted: Thu Oct 09, 2008 4:52 pm
by Lutz
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':
Code: Select all
(set 'f (lambda ()
(let (e)
(setq e (map eval (args)))
(println "Disco! " (string? nil) "! Punk!"))))
(f "Rock'n'roll") => Disco! nil! Punk!