aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsternenseemann <sternenseemann@systemli.org>2021-09-26 14:45:22 +0200
committersternenseemann <sternenseemann@systemli.org>2021-09-26 15:03:31 +0200
commit23ad01959192779e17a313ac4537ae73bde2db00 (patch)
treebb0a3e29f20480b3a1290dfab12df06c73709df7
parent46e810ac94dbdccecd1f03e0ce073e2268453c61 (diff)
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.
-rw-r--r--editors/emacs/bqn-input.el4
1 files 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))