Refactor core initfiles

This commit is contained in:
Henrik Lissner 2015-01-09 21:47:51 -05:00
parent 2a7dac1a4e
commit 8e7cd74e07
8 changed files with 157 additions and 176 deletions

View file

@ -1,12 +1,12 @@
;; Elisp ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun 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
(lambda ()
(if (file-exists-p (concat buffer-file-name "c"))
(delete-file (concat buffer-file-name "c"))))))
(add-hook! 'after-save-hook
(if (file-exists-p (concat buffer-file-name "c"))
(delete-file (concat buffer-file-name "c")))))
(add-hook 'after-save-hook 'remove-elc-on-save)
(add-hook 'emacs-lisp-mode-hook 'remove-elc-on-save)
(add-hook 'emacs-lisp-mode-hook 'turn-on-eldoc-mode)
(evil-define-operator my:elisp-eval (beg end)
@ -28,6 +28,9 @@
(bind 'motion emacs-lisp-mode-map "g r" 'my:elisp-eval)
;; TODO Add clojure support
;; TODO Add scheme support
(provide 'init-elisp)
(provide 'init-lisp)
;;; init-elisp.el ends here