From 23ad01959192779e17a313ac4537ae73bde2db00 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sun, 26 Sep 2021 14:45:22 +0200 Subject: emacs/bqn-input.el: don't add broken bindings in the BQN mode map Using a plain space in emacs key binding syntax can be problematic (especially making users unable to type "s" if the mode map prefix is "s-"). Therefore we must make sure to convert the strings we have in bqn-symbols.el into proper emacs key syntax. Luckily we can use single-key-description to do exactly that. --- editors/emacs/bqn-input.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editors/emacs/bqn-input.el b/editors/emacs/bqn-input.el index db462c97..30af1ff3 100644 --- a/editors/emacs/bqn-input.el +++ b/editors/emacs/bqn-input.el @@ -24,8 +24,8 @@ (defun bqn--make-base-mode-map (prefix) (let ((map (make-sparse-keymap))) (dolist (command bqn--symbols) - (let ((key (caddr command))) - (define-key map (bqn--kbd (concat prefix s)) (bqn--make-key-command-sym (car command))))) + (let ((key (single-key-description (string-to-char (caddr command))))) + (define-key map (bqn--kbd (concat prefix key)) (bqn--make-key-command-sym (car command))))) (define-key map [menu-bar bqn] (cons "BQN" (make-sparse-keymap "BQN"))) map)) -- cgit v1.2.3