diff options
author | yoni-r <yoni-r> | 2006-06-26 14:15:00 +0000 |
---|---|---|
committer | yoni-r <mwolson@gnu.org> | 2006-06-26 14:15:00 +0000 |
commit | 50eebbbff0345d945ac7073273a034d8a3071e0b (patch) | |
tree | 7e761f6412927deab35d283b3fad7c1d7a444668 | |
parent | 5e4ffd984d94f89699d038bfd8ff06154fb27dc7 (diff) |
make M-> act like a normal Emacs buffer for emms-playlist-mode
darcs-hash:20060626141534-85c19-d4133931635bd1f01bd5295567d2a4678d778ad4.gz
-rw-r--r-- | emms-playlist-mode.el | 17 |
1 files 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) |