From 50eebbbff0345d945ac7073273a034d8a3071e0b Mon Sep 17 00:00:00 2001 From: yoni-r Date: Mon, 26 Jun 2006 14:15:00 +0000 Subject: make M-> act like a normal Emacs buffer for emms-playlist-mode darcs-hash:20060626141534-85c19-d4133931635bd1f01bd5295567d2a4678d778ad4.gz --- emms-playlist-mode.el | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/emms-playlist-mode.el b/emms-playlist-mode.el index aa66602..c955b26 100644 --- a/emms-playlist-mode.el +++ b/emms-playlist-mode.el @@ -143,15 +143,26 @@ FUN should be a function." (emms-playlist-mode-move-wrapper emms-playlist-mode-first emms-playlist-first) -(emms-playlist-mode-move-wrapper emms-playlist-mode-last - emms-playlist-last) - (emms-playlist-mode-move-wrapper emms-playlist-mode-select-next emms-playlist-next) (emms-playlist-mode-move-wrapper emms-playlist-mode-select-previous emms-playlist-previous) +(defun emms-playlist-mode-last () + "Move to directly after the last track in the current buffer." + (interactive) + (emms-playlist-ensure-playlist-buffer) + (let ((last (condition-case nil + (save-excursion + (goto-char (point-max)) + (point)) + (error + nil)))) + (if last + (goto-char last) + (error "No last track")))) + (defun emms-playlist-mode-center-current () "Move point to the currently selected track." (interactive) -- cgit v1.2.3