aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorforcer <forcer>2005-09-15 19:26:00 +0000
committerforcer <mwolson@gnu.org>2005-09-15 19:26:00 +0000
commitf797263d20955756cef4047d71b9232ed3df6bdc (patch)
tree7d91535cf7decfa38cb3778aa4117ecdd40a4e5a
parentafa65e1b447c45d587cda694b5fa8fa460be4a0f (diff)
Add `emms-playlist-buffer-p'.
darcs-hash:20050915192621-2189f-77ac4024f5f200c66441c741adb7fd7fb16f7aee.gz
-rw-r--r--emms.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/emms.el b/emms.el
index b94b2d9..683e4ae 100644
--- a/emms.el
+++ b/emms.el
@@ -400,6 +400,10 @@ Otherwise, return the type and the name with a colon in between."
"The marker for the currently selected track.")
(make-variable-buffer-local 'emms-playlist-selected-marker)
+(defvar emms-playlist-buffer-p nil
+ "Non-nil when the current buffer is an EMMS playlist.")
+(make-variable-buffer-local 'emms-playlist-buffer-p)
+
(defun emms-playlist-set-playlist-buffer (&optional buffer)
"Set the current playlist buffer."
(interactive "bNew playlist buffer: ")
@@ -427,6 +431,7 @@ used, and the contents removed."
(point-max)))
(when (not (eq major-mode emms-playlist-default-major-mode))
(funcall emms-playlist-default-major-mode))
+ (setq emms-playlist-buffer-p t)
(run-hooks 'emms-playlist-cleared-hook))
(setq emms-playlist-buffer buf)))