From 2c1c56d553df6ee1973134fdb90543454b1146ca Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Wed, 5 Aug 2009 08:07:03 -0700 Subject: Introduce emms-insert-file-contents. This function is a safe way to insert the contents of a file without triggering major mode detection, and has been tested on several versions of Emacs and XEmacs. --- lisp/emms-source-playlist.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lisp/emms-source-playlist.el') diff --git a/lisp/emms-source-playlist.el b/lisp/emms-source-playlist.el index 57a299d..b7677ec 100644 --- a/lisp/emms-source-playlist.el +++ b/lisp/emms-source-playlist.el @@ -177,7 +177,7 @@ See `emms-source-playlist-formats' for a list of supported formats." t))) (mapc #'emms-playlist-insert-track (with-temp-buffer - (insert-file-contents file) + (emms-insert-file-contents file) (goto-char (point-min)) (let ((format (emms-source-playlist-determine-format))) (if format @@ -234,7 +234,7 @@ OUT should be the buffer where tracks are stored in the native EMMS format." t))) (mapc #'emms-playlist-insert-track (with-temp-buffer - (insert-file-contents file) + (emms-insert-file-contents file) (goto-char (point-min)) (when (not (emms-source-playlist-native-p)) (error "Not a native EMMS playlist file.")) @@ -307,7 +307,7 @@ OUT should be the buffer where tracks are stored in m3u format." t))) (mapc #'emms-playlist-insert-track (with-temp-buffer - (insert-file-contents file) + (emms-insert-file-contents file) (goto-char (point-min)) (when (not (emms-source-playlist-m3u-p)) (error "Not an m3u playlist file.")) @@ -388,7 +388,7 @@ OUT should be the buffer where tracks are stored in pls format." t))) (mapc #'emms-playlist-insert-track (with-temp-buffer - (insert-file-contents file) + (emms-insert-file-contents file) (goto-char (point-min)) (when (not (emms-source-playlist-pls-p)) (error "Not a pls playlist file.")) -- cgit v1.2.3