Created
September 1, 2010 06:46
-
-
Save klang/560327 to your computer and use it in GitHub Desktop.
What parens? All I see is the program. (the Clojure color part of http://briancarper.net/blog/492/emacs-clojure-colors in one convenient place. Just dimming the parens: http://www.davep.org/emacs/parenface.el --- from: http://briancarper.net/blog/492/emac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun lisp-enable-paredit-hook () (paredit-mode 1)) | |
(add-hook 'clojure-mode-hook 'lisp-enable-paredit-hook) | |
(defmacro defclojureface (name color desc &optional others) | |
`(defface ,name '((((class color)) (:foreground ,color ,@others))) ,desc :group 'faces)) | |
(defclojureface clojure-parens "DimGrey" "Clojure parens") | |
(defclojureface clojure-braces "#49b2c7" "Clojure braces") | |
(defclojureface clojure-brackets "SteelBlue" "Clojure brackets") | |
(defclojureface clojure-keyword "khaki" "Clojure keywords") | |
(defclojureface clojure-namespace "#c476f1" "Clojure namespace") | |
(defclojureface clojure-java-call "#4bcf68" "Clojure Java calls") | |
(defclojureface clojure-special "#b8bb00" "Clojure special") | |
(defclojureface clojure-double-quote "#b8bb00" "Clojure special" (:background "unspecified")) | |
(defun tweak-clojure-syntax () | |
(mapcar (lambda (x) (font-lock-add-keywords nil x)) | |
'((("#?['`]*(\\|)" . 'clojure-parens)) | |
(("#?\\^?{\\|}" . 'clojure-brackets)) | |
(("\\[\\|\\]" . 'clojure-braces)) | |
((":\\w+" . 'clojure-keyword)) | |
(("#?\"" 0 'clojure-double-quote prepend)) | |
(("nil\\|true\\|false\\|%[1-9]?" . 'clojure-special)) | |
(("(\\(\\.[^ \n)]*\\|[^ \n)]+\\.\\|new\\)\\([ )\n]\\|$\\)" 1 'clojure-java-call)) | |
))) | |
(add-hook 'clojure-mode-hook 'tweak-clojure-syntax) | |
(custom-set-faces | |
;; custom-set-faces was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(slime-highlight-edits-face ((((class color) (background dark)) (:background "#202020"))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment