]> rhodes.io Git - iplayer-el.git/commitdiff
Christophe Weblog Wiki Code Publications Music
(ab)use mode-line-process to display preset in the mode line
authorChristophe Rhodes <csr21@cantab.net>
Tue, 24 Apr 2012 11:33:41 +0000 (12:33 +0100)
committerChristophe Rhodes <csr21@cantab.net>
Tue, 24 Apr 2012 11:33:41 +0000 (12:33 +0100)
iplayer.el

index aaa913ae0f41ae532c8cf2a1615c44962c216ad3..68d3a01190c95b22d37211623fa80b3168721478 100644 (file)
@@ -64,7 +64,9 @@
      ((= (length keys) 1)
       (let ((channel (cdr (assoc keys presets))))
         (if channel
-            (iplayer-channel (format "^%s$" channel))
+            (progn
+              (setq mode-line-process (format "[%s]" channel))
+              (iplayer-channel (format "^%s$" channel)))
           (error "no preset for key %s" keys)))))))
 
 (defun iplayer-channel (channel)
 
 (defun iplayer ()
   (interactive)
+  (setq mode-line-process nil)
   (display-iplayer-tree (get-iplayer-tree)))
 
 (provide 'iplayer)