From 5e93ddc62b2a21e5cf01a1cff533988424cd0d63 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Fri, 3 May 2013 15:42:27 +0300 Subject: [PATCH] Fix #313 - invoke prelude-remove-elc-on-save only for Emacs Lisp buffers --- modules/prelude-emacs-lisp.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/prelude-emacs-lisp.el b/modules/prelude-emacs-lisp.el index 202de20..4b8753c 100644 --- a/modules/prelude-emacs-lisp.el +++ b/modules/prelude-emacs-lisp.el @@ -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.