emms-patches
[Top][All Lists]
Advanced

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

[Emms-patches] [COMMIT] (emms-history-file-coding-system): New var. (emm


From: William Xu
Subject: [Emms-patches] [COMMIT] (emms-history-file-coding-system): New var. (emms-history-save): Set mode and coding-system in saved file.
Date: Sun, 26 Jul 2009 13:45:48 +0800

---
 lisp/emms-history.el |    9 +++++++++
 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")
-- 
debian.1.5.6.1.19.ge6b2





reply via email to

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