The Lambda Lab
/
projects
/
emus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bd337ab
)
Always keep selected track centred in browser.
author
Tim Vaughan
<timv@ughan.xyz>
Tue, 10 Dec 2019 08:15:16 +0000
(09:15 +0100)
committer
Tim Vaughan
<timv@ughan.xyz>
Tue, 10 Dec 2019 08:15:16 +0000
(09:15 +0100)
emus.el
patch
|
blob
|
history
diff --git
a/emus.el
b/emus.el
index
e3d17f6
..
998a1e8
100644
(file)
--- a/
emus.el
+++ b/
emus.el
@@
-64,19
+64,19
@@
:type '(string))
(defface emus-artist
:type '(string))
(defface emus-artist
- '((t :inherit font-lock-
keyword
-face :background "#333"))
+ '((t :inherit font-lock-
string
-face :background "#333"))
"Face used for artist names in browser.")
(defface emus-album
"Face used for artist names in browser.")
(defface emus-album
- '((t :inherit font-lock-
function-name
-face :background "#222"))
+ '((t :inherit font-lock-
constant
-face :background "#222"))
"Face used for album names in browser.")
(defface emus-track
"Face used for album names in browser.")
(defface emus-track
- '((t :inherit font-lock-
string
-face))
+ '((t :inherit font-lock-
keyword
-face))
"Face used for track titles in browser.")
(defface emus-track-current
"Face used for track titles in browser.")
(defface emus-track-current
- '((t :inherit font-lock-
string
-face :inverse-video t))
+ '((t :inherit font-lock-
keyword
-face :inverse-video t))
"Face used for track titles in browser.")
(defface emus-cursor
"Face used for track titles in browser.")
(defface emus-cursor
@@
-241,6
+241,7
@@
(setq emus-current-track track)
(emus--update-track old-track)
(emus--update-track track)
(setq emus-current-track track)
(emus--update-track old-track)
(emus--update-track track)
+ (emus-centre-current)
(emus--resume-cp))))
(defun emus-select-track (track)
(emus--resume-cp))))
(defun emus-select-track (track)
@@
-251,6
+252,7
@@
(setq emus-current-track track)
(emus--update-track old-track)
(emus--update-track track)
(setq emus-current-track track)
(emus--update-track old-track)
(emus--update-track track)
+ (emus-centre-current)
(emus-send-cmd "o")
(emus--resume-cp))))
(emus-send-cmd "o")
(emus--resume-cp))))
@@
-459,7
+461,6
@@
(defun emus-centre-current ()
(interactive)
(when (get-buffer "*emus*")
(defun emus-centre-current ()
(interactive)
(when (get-buffer "*emus*")
- (switch-to-buffer "*emus*")
(when emus-current-track
(goto-char (emus-track-browser-pos emus-current-track))
(recenter))))
(when emus-current-track
(goto-char (emus-track-browser-pos emus-current-track))
(recenter))))