aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Xu <william.xwl@gmail.com>2009-07-26 13:45:48 +0800
committerWilliam Xu <william.xwl@gmail.com>2009-07-26 13:45:48 +0800
commit8176350744ebefe066478bfc3de9a00e34261b77 (patch)
treeaed6e8c6506ce2276b598d15a0011439f8483058
parent79096375362b8ee33ee5842e0f94da90535e2999 (diff)
(emms-history-file-coding-system): New var.
(emms-history-save): Set mode and coding-system in saved file.
-rw-r--r--lisp/emms-history.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/emms-history.el b/lisp/emms-history.el
index 9a0d991..7526e87 100644
--- a/lisp/emms-history.el
+++ b/lisp/emms-history.el
@@ -56,6 +56,11 @@ Emacs."
:type 'boolean
:group 'emms-history)
+(defcustom emms-history-file-coding-system 'utf-8
+ "Coding system used for saving `emms-history-file'."
+ :type 'coding-system
+ :group 'emms-history)
+
(defun emms-history-save ()
"Save all playlists that are open in this Emacs session."
(interactive)
@@ -83,6 +88,10 @@ Emacs."
(point-max)))))
playlists))))
(with-temp-buffer
+ (insert
+ (concat ";;; emms history -*- mode: emacs-lisp; coding: "
+ (symbol-name emms-history-file-coding-system)
+ "; -*-\n"))
(insert "(\n;; active playlist\n")
(prin1 (buffer-name oldbuf) (current-buffer))
(insert "\n;; playlists: ((BUFFER_NAME SELECT_POSITION TRACKS) ...)\n")