(goto-char old-pos))))
(defun emus-click-record (button)
- (emus-play-record (button-get button 'emus-record)))
+ (emus-play-record (button-get button 'emus-record))
+ (emus-display-status))
(defun emus-centre-current ()
(interactive)
(emus-render-records)
(emus-update-records)))
+(defun emus-playpause-status () (interactive) (emus-playpause) (emus-display-status))
+(defun emus-stop-status () (interactive) (emus-stop) (emus-display-status))
+(defun emus-volume-up-status () (interactive) (emus-volume-up) (emus-display-status))
+(defun emus-volume-down-status () (interactive) (emus-volume-down) (emus-display-status))
+(defun emus-update-records-status () (interactive) (emus-update-records) (emus-display-status))
+(defun emus-play-next-status () (interactive) (emus-play-next) (emus-display-status))
+(defun emus-play-prev-status () (interactive) (emus-play-prev) (emus-display-status))
+(defun emus-centre-current-status () (interactive) (emus-centre-current) (emus-display-status))
+
(defvar emus-browser-mode-map
(let ((map (make-sparse-keymap)))
- (define-key map (kbd "SPC") 'emus-playpause)
- (define-key map (kbd "o") 'emus-stop)
- (define-key map (kbd "+") 'emus-volume-up)
- (define-key map (kbd "=") 'emus-volume-up)
- (define-key map (kbd "-") 'emus-volume-down)
- (define-key map (kbd "R") 'emus-update-records)
- (define-key map (kbd "n") 'emus-play-next)
- (define-key map (kbd "p") 'emus-play-prev)
- (define-key map (kbd "c") 'emus-centre-current)
+ (define-key map (kbd "SPC") 'emus-playpause-status)
+ (define-key map (kbd "o") 'emus-stop-status)
+ (define-key map (kbd "+") 'emus-volume-up-status)
+ (define-key map (kbd "=") 'emus-volume-up-status)
+ (define-key map (kbd "-") 'emus-volume-down-status)
+ (define-key map (kbd "R") 'emus-update-records-status)
+ (define-key map (kbd "n") 'emus-play-next-status)
+ (define-key map (kbd "p") 'emus-play-prev-status)
+ (define-key map (kbd "c") 'emus-centre-current-status)
(when (fboundp 'evil-define-key*)
(evil-define-key* 'motion map
- (kbd "SPC") 'emus-playpause
- (kbd "o") 'emus-stop
- (kbd "+") 'emus-volume-up
- (kbd "=") 'emus-volume-up
- (kbd "-") 'emus-volume-down
- (kbd "R") 'emus-update-records
- (kbd "n") 'emus-play-next
- (kbd "p") 'emus-play-prev
- (kbd "c") 'emus-centre-current))
+ (kbd "SPC") 'emus-playpause-status
+ (kbd "o") 'emus-stop-status
+ (kbd "+") 'emus-volume-up-status
+ (kbd "=") 'emus-volume-up-status
+ (kbd "-") 'emus-volume-down-status
+ (kbd "R") 'emus-update-records-status
+ (kbd "n") 'emus-play-next-status
+ (kbd "p") 'emus-play-prev-status
+ (kbd "c") 'emus-centre-current-status))
map)
"Keymap for emus.")