aboutsummaryrefslogtreecommitdiff
path: root/lisp/emms-source-playlist.el
diff options
context:
space:
mode:
authorYoni Rabkin <yonirabkin@member.fsf.org>2008-09-02 20:46:14 +0300
committerYoni Rabkin <yonirabkin@member.fsf.org>2008-09-02 20:46:14 +0300
commit376b9ebede6cc8c6fbcd3d2ececaa7311d67a973 (patch)
tree44146c31ddbcb4e15f53c41a9e4008a41cbc9626 /lisp/emms-source-playlist.el
parent36b3d963b1ff780914a7e690a34cd0ba3a65043a (diff)
Ask before saving over an existing playlist file.
As suggested on the mailing list, this feature can be turned off. The appropriate documentation has been added to the Emms manual. Signed-off-by: Yoni Rabkin <yonirabkin@member.fsf.org>
Diffstat (limited to 'lisp/emms-source-playlist.el')
-rw-r--r--lisp/emms-source-playlist.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/emms-source-playlist.el b/lisp/emms-source-playlist.el
index 35ed254..1aeaa9c 100644
--- a/lisp/emms-source-playlist.el
+++ b/lisp/emms-source-playlist.el
@@ -71,6 +71,12 @@ If this is nil, you will be prompted for a format to use."
(symbol :tag "Other"))
:group 'emms)
+(defcustom emms-source-playlist-ask-before-overwrite t
+ "*Ask before saving over an existing playlist.
+If this is nil, existig playlists will be quitely overwritten."
+ :type 'boolean
+ :group 'emms)
+
;;; General playlist
(defsubst emms-source-playlist-p-sym (format)
@@ -139,7 +145,7 @@ The default format is specified by `emms-source-playlist-default-format'."
(current-buffer))
(current-buffer))
(let ((backup-inhibited t))
- (write-file file))))
+ (write-file file emms-source-playlist-ask-before-overwrite))))
(defun emms-source-playlist-determine-format (&optional parse-files)
"Determine the playlist format of the current buffer.