Bill Clementson's Blog

Bits and pieces (mostly Lisp-related) that I collect from the ether.

November 2003
Sun Mon Tue Wed Thu Fri Sat
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
Oct  Dec

Macroexpand in PLT Scheme - Version 1

Wednesday, November 12, 2003

Since scheme-mode in Emacs has no built-in support for expanding macros in Scheme, I've written some helper code to make it easier to do syntax expansions. I've made use of Eli Barzilay's "-test" expander code and have bound specific syntax expansion functionality to different keys. Once this code is installed and you are in scheme-mode, you can do the following:

All output goes to the *scheme* buffer. I've found it a helpful extension for exploring the functionality of the different syntax expansion alternatives - I hope others find it useful too.

To set it up, do the following:

  1. Download Eli Barzilay's -test macro from http://bc.tech.coop/expand.scm and copy the code into your MzScheme initialization file (it's called mzschemerc.ss on MS Windows but the name varies on different OS's)
  2. Download my emacs lisp code from http://bc.tech.coop/expand.el and copy the code into your .emacs file
That's it - enjoy!

emacs Copyright © 2005 by Bill Clementson