Skip to content

Commit

Permalink
Paren-face for clojure-mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
technomancy committed Jan 22, 2009
1 parent 4e44137 commit 354349c
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions starter-kit-lisp.el
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
(add-hook 'emacs-lisp-mode-hook (lambda () (paredit-mode +1)))
(add-hook 'lisp-mode-hook (lambda () (paredit-mode +1)))))

(defface paren-face
(defface esk-paren-face
'((((class color) (background dark))
(:foreground "grey20"))
(((class color) (background light))
Expand All @@ -27,9 +27,9 @@

(add-hook 'emacs-lisp-mode-hook 'eldoc-mode)
(add-hook 'emacs-lisp-mode-hook 'coding-hook)
(add-hook 'emacs-lisp-mode-hook 'emacs-lisp-remove-elc-on-save)
(add-hook 'emacs-lisp-mode-hook 'esk-remove-elc-on-save)

(defun emacs-lisp-remove-elc-on-save ()
(defun esk-remove-elc-on-save ()
"If you're saving an elisp file, likely the .elc is no longer valid."
(make-local-variable 'after-save-hook)
(add-hook 'after-save-hook
Expand All @@ -38,7 +38,7 @@
(delete-file (concat buffer-file-name "c"))))))

(font-lock-add-keywords 'emacs-lisp-mode
'(("(\\|)" . 'paren-face)))
'(("(\\|)" . 'esk-paren-face)))

;;; Clojure

Expand All @@ -61,7 +61,9 @@ root as an argument."
swank-clojure-extra-classpaths
(list (concat src-path "/clojure-contrib/clojure-contrib.jar")))

(add-hook 'clojure-mode-hook 'coding-hook))
(add-hook 'clojure-mode-hook 'coding-hook)
(font-lock-add-keywords 'clojure-mode
'(("(\\|)" . 'esk-paren-face))))

;; TODO: test this!
(defun esk-clojure-install (src-path)
Expand Down Expand Up @@ -97,13 +99,13 @@ root as an argument."

(add-hook 'scheme-mode-hook 'coding-hook)
(font-lock-add-keywords 'scheme-mode
'(("(\\|)" . 'paren-face)))
'(("(\\|)" . 'esk-paren-face)))

;;; Common Lisp

(add-hook 'lisp-mode-hook 'coding-hook)
(font-lock-add-keywords 'lisp-mode
'(("(\\|)" . 'paren-face)))
'(("(\\|)" . 'esk-paren-face)))

(provide 'starter-kit-lisp)
;; starter-kit-lisp.el ends here

0 comments on commit 354349c

Please sign in to comment.