branch: elpa/bind-map
commit 38dc69ab80615e6e6e0aca18c9a6c1728c3b27c3
Author: justbur <jus...@burkett.cc>
Commit: justbur <jus...@burkett.cc>

    Make sure major-mode keys are activated initially
---
 bind-map.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/bind-map.el b/bind-map.el
index 3644785e19..a95d9c0951 100644
--- a/bind-map.el
+++ b/bind-map.el
@@ -241,6 +241,8 @@ mode maps. Set up by bind-map.el." map))
            (add-to-list ',major-mode-list mode))
          (defun ,activate-func ()
            (setq ,activate (not (null (member major-mode ,major-mode-list)))))
+         ;; call once in case we are already in the relevant major mode
+         (,activate-func)
          (add-hook 'change-major-mode-after-body-hook ',activate-func))
 
        (when (and ,override-minor-modes

Reply via email to