Skip to content

Instantly share code, notes, and snippets.

@PhilHudson
Created February 22, 2012 09:34
Show Gist options
  • Save PhilHudson/1883609 to your computer and use it in GitHub Desktop.
Save PhilHudson/1883609 to your computer and use it in GitHub Desktop.
pretty-lambdas for elisp
(defun pretty-lambdas ()
"Show glyph for lower-case Greek lambda (λ) wherever 'lambda' appears."
(font-lock-add-keywords
nil
`(("(\\(lambda\\>\\)"
(0
(progn
(compose-region
(match-beginning 1)
(match-end 1)
,(make-char 'greek-iso8859-7 107))
'font-lock-keyword-face))))))
(add-hook 'elisp-mode-hook 'pretty-lambdas)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment