From c3e08253a22aaa9ba3eba33178168da689fa87e2 Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Sun, 22 Oct 2006 20:17:00 +0000 Subject: emms-playlist-mode: Handle case where selection has not been set but user wants to delete a region darcs-hash:20061022201724-1bfb2-58bd537d09c2f5bb2d6c70e72ed125488a7b24d8.gz --- emms-playlist-mode.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/emms-playlist-mode.el b/emms-playlist-mode.el index bc16701..c41cbe3 100644 --- a/emms-playlist-mode.el +++ b/emms-playlist-mode.el @@ -298,10 +298,11 @@ function switches back to the remembered buffer." (interactive) (emms-with-inhibit-read-only-t ;; Are we killing the playing/selected track? - (when (emms-playlist-mode-between-p - (marker-position emms-playlist-selected-marker) - (region-beginning) - (region-end)) + (when (and (markerp emms-playlist-selected-marker) + (emms-playlist-mode-between-p + (marker-position emms-playlist-selected-marker) + (region-beginning) + (region-end))) (emms-stop) (delete-overlay emms-playlist-mode-selected-overlay) (setq emms-playlist-mode-selected-overlay nil)) -- cgit v1.2.3