aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwilliam.xwl <william.xwl>2006-04-03 13:49:00 +0000
committerwilliam.xwl <mwolson@gnu.org>2006-04-03 13:49:00 +0000
commitff4bd16b5db79f53d55637724afe413aa100e372 (patch)
treeb8beead2a0968e597f0dd9a078b202818230eb2e
parent2ae7913992e5a562771194de52b1e92168b51781 (diff)
New variable: `emms-lyrics-coding-system'. It's the coding system used
in the output of lyrics. (I sent this before, maybe some unexpected problem happened.) darcs-hash:20060403134922-e8fe6-5b1bb0825a3f5f6616024226d1d0c6015c3aa83c.gz
-rw-r--r--emms-lyrics.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/emms-lyrics.el b/emms-lyrics.el
index 645b8cc..5c07ad2 100644
--- a/emms-lyrics.el
+++ b/emms-lyrics.el
@@ -93,6 +93,11 @@ for lyrics in current directory and this directory."
:type 'string
:group 'emms-lyrics)
+(defcustom emms-lyrics-coding-system 'latin-1
+ "Coding system used in the output of lyrics."
+ :type 'coding-system
+ :group 'emms-lyrics)
+
(defcustom emms-lyrics-mode-hook nil
"Normal hook run after entering Emms Lyric mode."
:type 'hook
@@ -135,6 +140,7 @@ To find FILE, will look up in current directory and `emms-lyrics-dir'."
(setq file (emms-lyrics-find-lyric file)))
(when (and file (not (string= file "")) (file-exists-p file))
(with-temp-buffer
+ (let ((coding-system-for-read emms-lyrics-coding-system))
(insert-file-contents file)
(while (search-forward-regexp "\\[[0-9:.]+\\].*" nil t)
(let ((lyric-string (match-string 0))
@@ -157,7 +163,7 @@ To find FILE, will look up in current directory and `emms-lyrics-dir'."
(substring lyric-string (length time-string)))
(setq emms-lyrics-alist
(append emms-lyrics-alist `((,time ,lyric))))
- (setq time 0)))))
+ (setq time 0))))))
t)))
(defun emms-lyrics-start ()