Fix #313 - invoke prelude-remove-elc-on-save only for Emacs Lisp buffers

This commit is contained in:
Bozhidar Batsov 2013-05-03 15:42:27 +03:00
parent 72294d1e70
commit 5e93ddc62b

View file

@ -37,11 +37,12 @@
(defun prelude-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"))))))
(delete-file (concat buffer-file-name "c"))))
nil
t))
(defun prelude-visit-ielm ()
"Switch to default `ielm' buffer.