Skip to content

Instantly share code, notes, and snippets.

@stefaneng
Last active December 28, 2015 11:19
Show Gist options
  • Save stefaneng/7492724 to your computer and use it in GitHub Desktop.
Save stefaneng/7492724 to your computer and use it in GitHub Desktop.
Pretty Lambdas
;; See: http://www.emacswiki.org/emacs/PrettyLambda
(defun pretty-lambdas ()
(font-lock-add-keywords
nil `(("(\\(lambda\\>\\)"
(0 (progn (compose-region (match-beginning 1) (match-end 1)
,(make-char 'greek-iso8859-7 107))
nil))))))
;; Insert lambda
(define-key scheme-mode-map [(hyper ?\\)] (lambda () (interactive) (insert "lambda ")))
(add-hook 'scheme-mode-hook 'pretty-lambdas)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment