From d42a9da0e52eced723e141015ab2fbec455b24a0 Mon Sep 17 00:00:00 2001 From: Paul Cadman Date: Wed, 6 Apr 2022 17:01:45 +0100 Subject: [PATCH] [emacs] Add load and goto def keybindings --- minijuvix-mode/minijuvix-mode.el | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/minijuvix-mode/minijuvix-mode.el b/minijuvix-mode/minijuvix-mode.el index b5a4978de..608036b7f 100644 --- a/minijuvix-mode/minijuvix-mode.el +++ b/minijuvix-mode/minijuvix-mode.el @@ -12,6 +12,8 @@ map) "Keymap for MiniJuvix mode.") +(evil-define-key 'normal 'global (kbd "l") 'minijuvix-load) +(add-hook 'minijuvix-mode-hook #'evil-normalize-keymaps) ;;;###autoload (add-to-list 'auto-mode-alist '("\\.m?juvix\\'" . minijuvix-mode)) @@ -25,14 +27,10 @@ (add-hook 'minijuvix-mode-hook (lambda () - - (eval-after-load 'evil-maps - '(evil-leader/set-key - "l" 'minijuvix-load - "g" 'minijuvix-goto-definition - )) - )) - ) + (with-eval-after-load 'evil-maps + (evil-define-key 'normal minijuvix-mode-map (kbd "SPC m l") 'minijuvix-load) + (evil-define-key 'normal minijuvix-mode-map (kbd "SPC m g") 'minijuvix-goto-definition) + (evil-normalize-keymaps))))) (defun minijuvix-clear-annotations () "Remove all annotations from the current buffer."