From c5d41072481620e4355ff4b8b327001241f66a7e Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Sat, 30 Jun 2018 12:33:16 +0700 Subject: [PATCH] Fix handling of keymap property when it's symbol valued The previous code would only handle the case when the property was a keymap. But it can also be a symbol representing a keymap. --- .../local/evil-evilified-state/evil-evilified-state.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/layers/+distributions/spacemacs-bootstrap/local/evil-evilified-state/evil-evilified-state.el b/layers/+distributions/spacemacs-bootstrap/local/evil-evilified-state/evil-evilified-state.el index ce6476fd1..6607c5b8c 100644 --- a/layers/+distributions/spacemacs-bootstrap/local/evil-evilified-state/evil-evilified-state.el +++ b/layers/+distributions/spacemacs-bootstrap/local/evil-evilified-state/evil-evilified-state.el @@ -80,7 +80,10 @@ Needed to bypass keymaps set as text properties." (unless (bound-and-true-p isearch-mode) (when (memq evil-state '(evilified visual)) - (let* ((map (get-char-property (point) 'keymap)) + (let* ((map-or-symbol (get-char-property (point) 'keymap)) + (map (if (and (symbolp map-or-symbol) (boundp map-or-symbol)) + (symbol-value map-or-symbol) + map-or-symbol)) (evilified-map (when map (cdr (assq 'evilified-state map)))) (command (when (and evilified-map (eq 1 (length (this-command-keys))))