From 8176350744ebefe066478bfc3de9a00e34261b77 Mon Sep 17 00:00:00 2001 From: William Xu Date: Sun, 26 Jul 2009 13:45:48 +0800 Subject: (emms-history-file-coding-system): New var. (emms-history-save): Set mode and coding-system in saved file. --- lisp/emms-history.el | 9 +++++++++ 1 file changed, 9 insertions(+) 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") -- cgit v1.2.3