Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 3 KB

README.md

File metadata and controls

37 lines (29 loc) · 3 KB

hEmacs

Emacs finally met Haskell

I've thought that "Emacs is an angel, EmacsLisp is an evil, though." It's dirty and I hate it personally. Who should be the next to the angel? Of course, it's Haskell!

Haskell and C have a high affinity each other. It's easy to call C code from Haskell and vice versa. So we might be able to write extensions in Haskell using C functions as interfaces.

To accomplish my goal below, I decided to bring uemacs as its base, cause it's a minimal Emacs and seemed easier to customize than GNU Emacs the hell.

Goal

  • Extent Emacs with Haskell
  • Get rid of all legacy code and bring modern atmosphere

Getting started

There's no specific way of implementation. However, there're some references which might help us:

GNU Emacs

Reference Description
emacs.c An entrypoint.
lisp.h Fundamental definitions for GNU Emacs Lisp interpreter.
lread.h Lisp parsing and input streams.
cmds.h Simple built-in editing commands.
eval.c Evaluator for GNU Emacs Lisp interpreter.

uEmacs

Reference Description
main.c An entrypoint.
eval.c Evaluator for .emacsrc.
names.c Name to function binding table. I intend to provide these functions for Haskell and use them in extensions.
startup execute the startup file
dofile yank a file into a buffer and execute it
dobuf execute the contents of the buffer pointed to by the passed BP

Contribution

Any contributions are welcomed. The author is not a Haskell professional so please give me any advice. Also, he's not a native English tongue. Supports like profreding are also appreciated.