Skip to content

Commit

Permalink
(ab)use mode-line-process to display preset in the mode line
Browse files Browse the repository at this point in the history
  • Loading branch information
csrhodes committed Apr 24, 2012
1 parent 9abb065 commit d78f76f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion iplayer.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -101,6 +103,7 @@

(defun iplayer ()
(interactive)
(setq mode-line-process nil)
(display-iplayer-tree (get-iplayer-tree)))

(provide 'iplayer)

0 comments on commit d78f76f

Please sign in to comment.