From 078d65d00b0d666b3a1bc5d664f2958d3607fb12 Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Wed, 14 May 2014 08:12:39 -0400 Subject: [PATCH] [emacs] Add new lisp hooks --- .emacs.d/Cask | 5 +++++ .emacs.d/init.d/lisp.el | 15 +++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.emacs.d/Cask b/.emacs.d/Cask index d69e5bc..ac20cb1 100644 --- a/.emacs.d/Cask +++ b/.emacs.d/Cask @@ -38,3 +38,8 @@ ;; Common Lisp ;; (depends-on "slime") ;; (depends-on "slime-repl") + +;; Lisp / Scheme +(depends-on "paredit") +(depends-on "rainbow-delimiters") +(depends-on "rainbow-identifiers") diff --git a/.emacs.d/init.d/lisp.el b/.emacs.d/init.d/lisp.el index 7b4d9ea..55a6038 100644 --- a/.emacs.d/init.d/lisp.el +++ b/.emacs.d/init.d/lisp.el @@ -4,5 +4,16 @@ (setq inferior-lisp-program "clisp") -;; Paredit -(eval-after-load "paredit" '(add-hook 'lisp-mode #'enable-paredit-mode)) +(mapcar (lambda (mode-hook) + (eval-after-load "paredit" `(add-hook ',mode-hook #'enable-paredit-mode)) + (eval-after-load "rainbow-delimiters" `(add-hook ',mode-hook #'rainbow-delimiters-mode)) + (eval-after-load "rainbow-identifiers" `(add-hook ',mode-hook #'rainbow-identifiers-mode)) + (add-hook mode-hook (lambda () + (show-paren-mode) + (electric-indent-mode 1))) + ) + '(lisp-mode-hook + emacs-lisp-mode-hook + scheme-mode-hook + lfe-mode-hook)) +