From: Tim Vaughan Date: Sat, 7 Dec 2019 23:28:11 +0000 (+0100) Subject: Browser now reports status after every command. X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=23bce7e2e61b07171b2ee0ac3e9acf4d076b89d3;p=emus.git Browser now reports status after every command. --- diff --git a/emus.el b/emus.el index 315ca6e..e145fd4 100644 --- a/emus.el +++ b/emus.el @@ -353,7 +353,8 @@ (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) @@ -373,28 +374,37 @@ (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.")