Unicode - the lighter side

Luke Gorrie luke@REDACTED
Wed Nov 5 16:08:44 CET 2003


One nice thing about Unicode is that you get a lot of extra APL-esque
gadget characters. I grabbed some code off the 'net [1] that lets you
put these to use in Emacs - so you get both syntax-colouring and
syntax-pretty-symbolifying.

It's pretty cute. If you load the attached file into Emacs, and then
do `M-x pretty-erlang' in an Erlang buffer, it swizzles in some
fancy symbols. For example, this contrived code:

  -module(sugar).
  -compile(export_all).

  negative(X) -> abs(X) /= X.
  positive(X) -> not negative(X) and (X /= 0).
  zero(X)     -> not negative(X) and not positive(X).

  between(X, Y, Z) -> (X>=Y) and (X=<Z).

  wait(Timeout) ->
      receive
          wakeup -> ok
      after Timeout ->
              timeout
      end.

Looks like the picture here:
http://www.bluetail.com/~luke/misc/sugar.png

You'll need to have the right fonts. It "just works" for me, having
installed all the Debian font packages a ways back.

Cheers,
Luke (champion of all that is crass)

[1]: http://www.emacswiki.org/cgi-bin/wiki.pl/PrettyLambda

-------------- next part --------------
A non-text attachment was scrubbed...
Name: unicode-symbol.el
Type: application/emacs-lisp
Size: 2651 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20031105/91645afc/attachment.bin>


More information about the erlang-questions mailing list