From 0b9320607705210f67f7b37dda5f9dc2ac47c9ea Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 29 Oct 2014 02:24:33 -0700 Subject: [PATCH] eval-and-replace for lisp mode. --- init.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index 0fe24333..3fd1ba61 100644 --- a/init.el +++ b/init.el @@ -152,11 +152,16 @@ Return a list of installed packages or nil for every package not installed." (defun no-auto-fill-hook () (auto-fill-mode -1)) +(defun bind-eval-and-replace () (define-key emacs-lisp-mode-map + (kbd "C-c C-r") #'esk-eval-and-replace)) + (add-hook 'prog-mode-hook 'no-auto-fill-hook) (add-hook 'prog-mode-hook (lambda () (subword-mode 1))) (add-hook 'prog-mode-hook 'rainbow-delimiters-mode) (add-hook 'prog-mode-hook 'auto-complete-mode) -(add-hook 'lisp-mode-hook (lambda () (local-set-key (kbd "C-c C-r") #'esk-eval-and-replace))) +(add-hook 'lisp-mode-hook 'bind-eval-and-replace) +(add-hook 'lisp-interaction-mode-hook 'bind-eval-and-replace) +(add-hook 'elisp-interaction-mode-hook 'bind-eval-and-replace) ;; disabled hooks ;; (add-hook 'prog-mode-hook (lambda () (highlight-lines-matching-regexp