From a6b9fd067cc16859a00bdf31dc6d6b8bc5398001 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Mon, 15 Jun 2015 23:03:26 -0400 Subject: init-python.el: Rename hook function --- lisp/init-python.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/init-python.el b/lisp/init-python.el index 30e8e15..48c19dd 100644 --- a/lisp/init-python.el +++ b/lisp/init-python.el @@ -6,17 +6,18 @@ (add-to-list 'interpreter-mode-alist '("python2" . python-mode)) (add-to-list 'interpreter-mode-alist '("python3" . python-mode)) +(add-hook 'python-mode-hook 'km/python-set-local-vars) (add-hook 'python-mode-hook (lambda () (add-hook 'post-self-insert-hook #'km/python-indent-post-self-insert-function 'append 'local))) -(defun km/python-hook () + +(defun km/python-set-local-vars () ;; Stop semantic from taking over imenu. (setq imenu-create-index-function #'python-imenu-create-index) (set (make-local-variable 'compile-command) "py.test")) -(add-hook 'python-mode-hook 'km/python-hook) (defun km/toggle-ipython-shell () "Switch between using python and IPython for interactive shell." -- cgit v1.2.3