diff options
author | yonirabkin <yonirabkin> | 2005-09-19 12:45:00 +0000 |
---|---|---|
committer | yonirabkin <mwolson@gnu.org> | 2005-09-19 12:45:00 +0000 |
commit | 5a9d752d58773ad9d85ee32c4d9569f73a2cf55c (patch) | |
tree | 4f90938f9ef34ece258038b51241bdf56a477001 | |
parent | 705ef3e86e6cde8e728906784df405c1385c1449 (diff) |
UNDO: Fix track switching error and interactive playlist yanking
darcs-hash:20050919124513-be80e-19b15bf7f3d48d50eead0ba1cad39f3f29c89ca3.gz
-rw-r--r-- | emms-lyrics.el | 6 | ||||
-rw-r--r-- | emms-mode-line.el | 4 | ||||
-rw-r--r-- | emms-playlist-mode.el | 18 |
3 files changed, 6 insertions, 22 deletions
diff --git a/emms-lyrics.el b/emms-lyrics.el index 8ca0cdd..63e4a1c 100644 --- a/emms-lyrics.el +++ b/emms-lyrics.el @@ -168,8 +168,7 @@ To find FILE, will look up in current directory and `emms-lyrics-dir'." emms-lyrics-pause-time nil emms-lyrics-elapsed-time 0) (when (and emms-lyrics-display-p - emms-lyrics-alist - (let ((file (cdaddr (emms-playlist-current-selected-track)))) + (let ((file (cdaddr (emms-playlist-selected-track)))) (emms-lyrics-read-file (replace-regexp-in-string (file-name-extension file) "lrc" file)))) @@ -180,7 +179,8 @@ To find FILE, will look up in current directory and `emms-lyrics-dir'." (defun emms-lyrics-stop () "Stop displaying lyrics." (interactive) - (when (and emms-lyrics-alist) + (when (and emms-lyrics-display-p + emms-lyrics-alist) (cancel-function-timers 'emms-lyrics-display) (if (or (not emms-player-paused-p) emms-player-stopped-p) diff --git a/emms-mode-line.el b/emms-mode-line.el index a060274..33e2da0 100644 --- a/emms-mode-line.el +++ b/emms-mode-line.el @@ -53,9 +53,7 @@ (defun emms-mode-line-playlist-current () "Format the currently playing song" - (format emms-mode-line-format - (emms-track-description - (emms-playlist-current-selected-track)))) + (format emms-mode-line-format (emms-track-description (emms-playlist-selected-track)))) (defvar emms-mode-line-initial-titlebar frame-title-format) diff --git a/emms-playlist-mode.el b/emms-playlist-mode.el index 4115993..5c81071 100644 --- a/emms-playlist-mode.el +++ b/emms-playlist-mode.el @@ -72,13 +72,10 @@ (define-key emms-playlist-mode-map (kbd "p") 'emms-previous) (define-key emms-playlist-mode-map (kbd "C-x C-s") 'emms-playlist-save-buffer) (define-key emms-playlist-mode-map (kbd "C-k") 'emms-playlist-mode-kill-track) - (define-key emms-playlist-mode-map (kbd "C-y") - #'(lambda () (interactive) (emms-playlist-mode-insert-last-killed-track kill-ring))) (define-key emms-playlist-mode-map (kbd "d") 'emms-playlist-mode-kill-track) (define-key emms-playlist-mode-map (kbd "s") 'emms-stop) (define-key emms-playlist-mode-map (kbd "f") 'emms-show) (define-key emms-playlist-mode-map (kbd "c") 'emms-playlist-mode-center-current) - (define-key emms-playlist-mode-map (kbd "C") 'emms-playlist-clear) (define-key emms-playlist-mode-map (kbd "RET") 'emms-playlist-mode-play-current-track) (define-key emms-playlist-mode-map (kbd "q") 'bury-buffer) (define-key emms-playlist-mode-map (kbd "<mouse-2>") 'emms-playlist-mode-play-current-track) @@ -134,17 +131,6 @@ FUN should be a function." (emms-stop)) (emms-start)) -(defun emms-playlist-mode-insert-last-killed-track (ring) - (if (null ring) - (error "No last killed track") - (let ((track nil)) - (with-temp-buffer - (insert (car ring)) - (setq track (get-text-property (point-min) 'emms-track))) - (if track - (emms-playlist-insert-track track) - (emms-playlist-mode-insert-last-killed-track (cdr ring)))))) - ;; The logic for killing tracks in an interactive manner is ;; suprisingly annoying (defun emms-playlist-mode-kill-track () @@ -153,7 +139,7 @@ FUN should be a function." (let ((region (emms-property-region (point) 'emms-track)) (inhibit-read-only t)) (cond ((not (emms-playlist-track-at)) - (kill-line 1)) + (kill-line 1)) ; Purposfully kills only one line ((and (not (emms-playlist-mode-selected-at)) (emms-playlist-track-at)) (kill-region (car region) @@ -191,7 +177,7 @@ FACE should be a... face." (defun emms-playlist-mode-overlay-unselected () ;; point-mix/max because -insert-source narrows the world - (emms-playlist-mode-overlay-track (point-min) + (emms-playlist-mode-overlay-track (point-min) (point-max) 'emms-playlist-track-face 1)) |