emms-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emms-patches] [PATCH] * lisp/emms-history.el: Don't set `kill-emacs-hoo


From: Arnaud Fontaine
Subject: [Emms-patches] [PATCH] * lisp/emms-history.el: Don't set `kill-emacs-hook' on noninteractive sessions.
Date: Sat, 5 Nov 2011 15:37:17 +0900

>From Emacs 24.1, `kill-emacs-hook' is ran even in batch mode (commit
1e5ffe30b3f7682ee8467e7694b5f63371e31cf9). As a consequence, upon
Debian package installation, byte compilation fails at the end as
/root/.emacs.d/emms/ does not exist and should not be created neither.
---
 lisp/emms-history.el |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lisp/emms-history.el b/lisp/emms-history.el
index feba6c7..4d3238b 100644
--- a/lisp/emms-history.el
+++ b/lisp/emms-history.el
@@ -103,7 +103,8 @@ Emacs."
           (insert "\n)")
           (write-file emms-history-file))))))
 
-(add-hook 'kill-emacs-hook 'emms-history-save)
+(unless noninteractive
+  (add-hook 'kill-emacs-hook 'emms-history-save))
 
 (defun emms-history-load ()
   "Restore all playlists in `emms-history-file'."
-- 
1.7.7.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]