diff options
author | William Xu <william.xwl@gmail.com> | 2007-07-17 09:54:00 +0000 |
---|---|---|
committer | William Xu <william.xwl@gmail.com> | 2007-07-17 09:54:00 +0000 |
commit | 3b34bdd7fb862f8784ce55990919ac5cb3b61803 (patch) | |
tree | 2d6fe360d8aad998122ae9a218ceb990285f8e58 | |
parent | a17384af097c2c62d1a434cbee00ccbac72fd33a (diff) |
emms-playlist-sort.el: Remove emms-playlist-sort-prefix to make the
codes more clean. And steal "s" prefix key from
`emms-playlist-mode'. (An alternative for emms-playlist-mode could be
"v", same as XMMS)
darcs-hash:20070717095454-cfa61-175bb84a0173d810d35cf994a06f37cf22eded81.gz
-rw-r--r-- | emms-playlist-sort.el | 38 |
1 files changed, 13 insertions, 25 deletions
diff --git a/emms-playlist-sort.el b/emms-playlist-sort.el index b125486..e13c6ac 100644 --- a/emms-playlist-sort.el +++ b/emms-playlist-sort.el @@ -33,14 +33,6 @@ :prefix "emms-playlist-sort-" :group 'emms) -;; FIXME, Should better avoid relying on setting before loading -(defcustom emms-playlist-sort-prefix "S" - "Prefix key sequence for `emms-playlist-sort-map'. -If you want to customize it, you must set this variable before -loading `emms-playlist-sort'." - :type 'string - :group 'emms-playlist-sort) - (defcustom emms-playlist-sort-list '(info-artist info-album) "Sorting list used by `emms-playlist-sort-by-list'. Currently it understands the following fields: name info-artist @@ -90,23 +82,19 @@ increasingly." (interactive) (emms-playlist-sort 'emms-playlist-sort-by-list-p)) -(defvar emms-playlist-sort-map - (let ((map (make-sparse-keymap))) - (define-key map (kbd "n") 'emms-playlist-sort-by-name) - (define-key map (kbd "a") 'emms-playlist-sort-by-info-artist) - (define-key map (kbd "t") 'emms-playlist-sort-by-info-title) - (define-key map (kbd "b") 'emms-playlist-sort-by-info-album) - (define-key map (kbd "y") 'emms-playlist-sort-by-info-year) - (define-key map (kbd "o") 'emms-playlist-sort-by-info-note) - (define-key map (kbd "N") 'emms-playlist-sort-by-natural-order) - (define-key map (kbd "l") 'emms-playlist-sort-by-list) - map)) - -(eval-after-load "emms-playlist-mode" - '(and (boundp 'emms-playlist-mode-map) - (define-key emms-playlist-mode-map - emms-playlist-sort-prefix - emms-playlist-sort-map))) +(eval-after-load 'emms-playlist-mode + '(progn + ;; Steal this key from emms-playlist-mode.. + (define-key emms-playlist-mode-map (kbd "s") nil) + + (define-key emms-playlist-mode-map (kbd "s n") 'emms-playlist-sort-by-name) + (define-key emms-playlist-mode-map (kbd "s a") 'emms-playlist-sort-by-info-artist) + (define-key emms-playlist-mode-map (kbd "s t") 'emms-playlist-sort-by-info-title) + (define-key emms-playlist-mode-map (kbd "s b") 'emms-playlist-sort-by-info-album) + (define-key emms-playlist-mode-map (kbd "s y") 'emms-playlist-sort-by-info-year) + (define-key emms-playlist-mode-map (kbd "s o") 'emms-playlist-sort-by-info-note) + (define-key emms-playlist-mode-map (kbd "s N") 'emms-playlist-sort-by-natural-order) + (define-key emms-playlist-mode-map (kbd "s l") 'emms-playlist-sort-by-list))) ;;; Low Level Functions |