Based on purcell's emacs configuration