From ceba71290c00410efa51aeaaa543e2fa89a3cddc Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Tue, 25 Jun 2013 21:03:46 +0100 Subject: [PATCH] fix preset-handling code on emacs24 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit only observable symptom was that £ for Radio 3 didn't work --- iplayer.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/iplayer.el b/iplayer.el index a27450b..b134ccf 100644 --- a/iplayer.el +++ b/iplayer.el @@ -163,13 +163,19 @@ Used in the `iplayer-preset' command.") +(defun iplayer-frob-presets (presets) + (cond + ((version< emacs-version "24") + (mapcar (lambda (x) (cons (read-kbd-macro (car x)) (cdr x))) presets)) + (t presets))) + (define-iplayer-command iplayer-preset (&optional keys) "Switch display to a preset channel. The presets are defined in the variable `iplayer-presets'." (interactive) (let ((keys (or (and keys (concat keys)) (this-command-keys))) - (presets (mapcar (lambda (x) (cons (read-kbd-macro (car x)) (cdr x))) iplayer-presets))) + (presets (iplayer-frob-presets iplayer-presets))) (cond ((= (length keys) 1) (let ((channel (cdr (assoc keys presets)))) -- 2.39.5