From 629a99c389473a6d0f27506be460bf0265d28f21 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Thu, 16 Oct 2014 20:03:31 -0400 Subject: [PATCH] setq rather than let-bind load-path during compilation. This ensures the same load-path is still in effect during shutdown, when any kill-emacs-hooks that may be set during compilation are run. * el-get-byte-compile.el (el-get-byte-compile-from-stdin): setq load-path. --- el-get-byte-compile.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/el-get-byte-compile.el b/el-get-byte-compile.el index de78b48f..61534d4e 100644 --- a/el-get-byte-compile.el +++ b/el-get-byte-compile.el @@ -135,9 +135,13 @@ whose value is a directory to be cleared of stale elc files." (assert noninteractive nil "`el-get-byte-compile-from-stdin' is to be used only with -batch") (let* ((input-data (read-minibuffer "")) - (load-path (append (plist-get input-data :load-path) load-path)) (files (plist-get input-data :compile-files)) + (input-load-path (plist-get input-data :load-path)) (dir-to-clean (plist-get input-data :clean-directory))) + ;; Use setq so that `load-path' stays updated until + ;; shutdown. Certain packages (eg w3m) might install shutdown + ;; hooks during compilation. + (setq load-path (append input-load-path load-path)) (unless (or dir-to-clean files) (warn "Did not get a list of files to byte-compile or a directory to clean. The input may have been corrupted.")) (when dir-to-clean