www.emacswiki.org/emacs/pretty-mode.el
This is a beautiful hack. It uses font-lock mode to render strings as other strings rather than just coloring the text in the buffer. It is easy to add your own unicode characters to display, and the code will compile because only the view is modified. It's possible to use two different codes for α, one for source code identifiers that expands to a legal identifier in the language and another that expands to a unicode sequence that will print as the unicode character. This is handy for a language like Standard ML (MLton) where unicode is allowed in neither identifiers nor strings. For instance
val forall = "\226\136\128"
prints as
val ∀ = "∀"
If you're interested in customizing pretty-mode it is very easy. You're welcome to check out my copy if you like, too.
ReplyDeleteHi Grant. Please send me your version when you get a moment so I can try yours as well. seanmcl at gmail. Thanks!
ReplyDeleteI just mailed it.
ReplyDeleteIn emacs 23.3.1 the right-halve of the characters get clipped off though.