Summary
Cannot unset read syntax
Metadata
- Id: 8bb4aa80dcc605fc3ee61071a860307e270e3b47
- Trac id: 940
- Type: defect
- Reporter: megane
- Owner:
- Cc:
- Status: closed
- Component: unknown
- Estimated difficulty:
- Resolution: fixed
- Priority: minor
- Milestone: someday
- Version: 4.8.x
- Changetime: 2012-10-31 21:58:38 UTC
- Created: 2012-10-24 23:11:03 UTC
- Keywords:
Attachments
- 8bb4aa80dcc605fc3ee61071a860307e270e3b47/attachments/set-read-syntax-unset-with-false.patch
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!