From d78f76fee563d2fd51a4ec613fe2d9d955e8877c Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Tue, 24 Apr 2012 12:33:41 +0100 Subject: [PATCH] (ab)use mode-line-process to display preset in the mode line --- iplayer.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iplayer.el b/iplayer.el index aaa913a..68d3a01 100644 --- a/iplayer.el +++ b/iplayer.el @@ -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) @@ -101,6 +103,7 @@ (defun iplayer () (interactive) + (setq mode-line-process nil) (display-iplayer-tree (get-iplayer-tree))) (provide 'iplayer) -- 2.39.5