From b631c35a263e364f9d3ec7fe85d9d47a54291a7a Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Sun, 16 Feb 2020 10:35:29 -0500 Subject: [PATCH] Use which-key-add-major-mode instead of hook-based approach --- emacs/init.org | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/emacs/init.org b/emacs/init.org index 4c19534..ca21818 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -2692,11 +2692,8 @@ And borrowing some functions from python-pytest, we can get some nosetests suppo (general-def nosetests-map "f" #'nosetests-file) (general-def nosetests-map "d" #'nosetests-def) - (add-hook 'python-mode-hook - (lambda () - (make-local-variable 'which-key-replacement-alist) - (which-key-add-key-based-replacements - "C-c t n" "nosetests"))) + (which-key-add-major-mode-key-based-replacements + 'python-mode "C-c t n" "nosetests") #+END_SRC * Hy