Skip to content

Instantly share code, notes, and snippets.

@cemerick
Last active May 25, 2020 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cemerick/6865761 to your computer and use it in GitHub Desktop.
Save cemerick/6865761 to your computer and use it in GitHub Desktop.
disabling λ, ƒ, and ∈ characters replacing fn and # without forking emacs-live
; in ~/.live-packs/$YOURNAME-pack/init.el
; not using `eval-after-load` because doing so appears to affect only the keywords associated
; with the first "type" of Clojure file you open (i.e. .clj or .cljs); this should knock out
; the special formatting on every buffer that ever has clojure-mode applied to it
(add-hook 'clojure-mode-hook
(lambda ()
(font-lock-remove-keywords
nil `(("(\\(fn\\)[\[[:space:]]"
(0 (progn (compose-region (match-beginning 1)
(match-end 1) "λ")
nil)))
("\\(#\\)("
(0 (progn (compose-region (match-beginning 1)
(match-end 1) "ƒ")
nil)))
("\\(#\\){"
(0 (progn (compose-region (match-beginning 1)
(match-end 1) "∈")
nil)))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment