Skip to content

Instantly share code, notes, and snippets.

@eschulte
Created February 24, 2012 18:56
Show Gist options
  • Save eschulte/1902952 to your computer and use it in GitHub Desktop.
Save eschulte/1902952 to your computer and use it in GitHub Desktop.
(font-lock-add-keywords
'lisp-mode
'(("\\<\\(bind\\)\\>" . font-lock-keyword-face)
("\\<\\(lambda-bind\\)\\>" . font-lock-keyword-face)
("\\<\\(lambda-registers\\)\\>" . font-lock-keyword-face)
("\\<\\(when-let\\)\\>" . font-lock-keyword-face)
("\\<\\(if-let\\)\\>" . font-lock-keyword-face)
;; fancy character for smaller lambda-bind
("(?\\(lambda-bind\\>\\)"
(0 (progn (compose-region (match-beginning 1) (match-end 1) ?\β) nil)))
("(?\\(lambda-registers\\>\\)"
(0 (progn (compose-region (match-beginning 1) (match-end 1) ?\Ρ) nil)))))
@eschulte
Copy link
Author

Example of how to easily add pretty characters to a major-mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment