From b998a8bd4741f1bb7bc3ab39a05cd77580d17e3f Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Wed, 28 May 2014 18:57:54 +0300 Subject: [PATCH] Don't recompile elc files outside of Prelude --- modules/prelude-emacs-lisp.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/prelude-emacs-lisp.el b/modules/prelude-emacs-lisp.el index d5e7612..c0c1767 100644 --- a/modules/prelude-emacs-lisp.el +++ b/modules/prelude-emacs-lisp.el @@ -39,7 +39,9 @@ "Recompile your elc when saving an elisp file." (add-hook 'after-save-hook (lambda () - (when (file-exists-p (byte-compile-dest-file buffer-file-name)) + (when (and + (string-prefix-p prelude-dir (file-truename buffer-file-name)) + (file-exists-p (byte-compile-dest-file buffer-file-name))) (emacs-lisp-byte-compile))) nil t))