Summary

Cannot unset read syntax

Metadata

Attachments

Description

This error only shows up with the interpreter.

I've attached a patch.

 (set-read-syntax!
  #\!
  (lambda (port) 
    (read-string 3 port)))
 
 (print (string? !foo))
 
 (set-read-syntax! #\! #f) ; <- try to unset
 (print "here")
 (print (string? !foo))
 
 ;; ; loading bug.scm ...
 ;; #t
 ;; here
 
 ;; Error: call of non-procedure: #f
 
 ;; 	Call history:
 
 ;; 	parley.scm:587: set-port-name!	  
 ;; 	<syntax>	  (set-read-syntax! #\! (lambda (port) (read-string 3 port)))
 ;; 	<syntax>	  (lambda (port) (read-string 3 port))
 ;; 	<syntax>	  (##core#lambda (port) (read-string 3 port))
 ;; 	<syntax>	  (##core#begin (read-string 3 port))
 ;; 	<syntax>	  (read-string 3 port)
 ;; 	<eval>	  (set-read-syntax! #\! (lambda (port) (read-string 3 port)))
 ;; 	<eval>	  (read-string 3 port)
 ;; 	<syntax>	  (print (string? "foo"))
 ;; 	<syntax>	  (string? "foo")
 ;; 	<eval>	  (print (string? "foo"))
 ;; 	<eval>	  (string? "foo")
 ;; 	<syntax>	  (set-read-syntax! #\! #f)
 ;; 	<eval>	  (set-read-syntax! #\! #f)
 ;; 	<syntax>	  (print "here")
 ;; 	<eval>	  (print "here")	<--

Changes and comments

[2012-10-24 23:12:29 UTC] megane attached set-read-syntax-unset-with-false.patch (description=#f)

[2012-10-31 21:58:38 UTC] sjamaan changed status from new to closed

[2012-10-31 21:58:38 UTC] sjamaan set resolution to fixed

[2012-10-31 21:58:38 UTC] sjamaan changed description

[2012-10-31 21:58:38 UTC] sjamaan wrote:

Fixed by 399f9968848c2dc1d0d7e94df5e2c5a699934e53 (what a pretty commit id... so many 9s)

Thanks!