From 748a13476bc23a66290f7fe74da66364aa6e4676 Mon Sep 17 00:00:00 2001 From: Clemens Radermacher Date: Thu, 12 Dec 2019 20:44:19 +0100 Subject: [PATCH] Allow to provide regular emacs commands in app keybinding lists If the key is mapped to a symbol it is an Emacs command otherwise an app command. --- eaf.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/eaf.el b/eaf.el index e89217e..dedddcf 100644 --- a/eaf.el +++ b/eaf.el @@ -505,10 +505,12 @@ to edit EAF keybindings!" fun))) (define-key map (kbd single-key) 'eaf-send-key)) (set-keymap-parent map eaf-mode-map*) (cl-loop for (key . fun) in keybinding - do (let ((dummy (intern - (format "eaf-%s-%s" app-name fun)))) - (eaf-dummy-function dummy fun key) - (define-key map (kbd key) dummy)) + do (if (symbolp fun) + (define-key map (kbd key) fun) + (let ((dummy (intern + (format "eaf-%s-%s" app-name fun)))) + (eaf-dummy-function dummy fun key) + (define-key map (kbd key) dummy))) finally return map)))) (defun eaf-get-app-bindings (app-name)