From: Matthew Flatt <mflatt@cs.utah.edu>
To: plt-scheme@po.cs.brown.edu
Subject: [plt-scheme] 205.8
Date: Thu, 4 Dec 2003 09:17:50 -0700
The exp-tagged code in CVS for MzScheme and MrEd is now version 205.8.
The changes are minor:
* Changed `get-argb-pixels’ and `set-argb-pixels’ in bitmap-dc% to
row-major order: left to right, then top to bottom.
* Added an optional argument to `get-face-list’. When it’s ’mono, font
faces known to be variable-width are removed from the list (under
Windows and X with fontconfig/Xft).
* Added `get-bitmap’ and `get-bitmap-mask’ to image-snip%.
* Added `vector-immutable’.
* Windows: fixed a bug that should have caused the save-file dialog to
crash most of the time in DrScheme.
Matthew
From: Matthew Flatt <mflatt@cs.utah.edu>
To: plt-scheme@po.cs.brown.edu
Subject: [plt-scheme] 205.8 addition - syntax-id-rules
Date: Thu, 4 Dec 2003 15:11:26 -0700
I’ve just exp-tagged an addition to v205.8.
The `syntax-id-rules’ form is like `syntax-rules’, except that it
creates a transformer that is invoked whenever its binding identifier
is used in an expression position (not just the application position)
and whenever it is used as a `set!’ target. In other words,
`syntax-id-rules’ is the `make-set!-transformer’ version of
`syntax-rules’.
I’m not sure that this form useful in practice (compared to using
`syntax-case’ and `make-set!-transformer’), but it helps for writing a
certain kind of tutorial.
(define-syntax pwd
(syntax-id-rules (set!)
[(set! pwd expr) (current-directory expr)]
[(clock expr ...) ((current-directory) expr ...)]
[clock (current-directory)]))
(set! pwd "/tmp") ; sets current-directory parameter
pwd ; => "/tmp"
(current-directory) ; => "/tmp"
(current-directory "/usr/tmp")
pwd ; => "/usr/tmp"
Matthew