   (when (configuration-layer/package-usedp 'anaconda-mode)
       (add-hook 'python-mode-hook
                 'spacemacs//disable-semantic-idle-summary-mode t))
-  (add-hook 'python-mode-hook 'semantic-mode)
-  (add-hook 'python-mode-hook 'spacemacs//python-imenu-create-index-use-semantic)
-
+  (spacemacs/add-to-hook 'python-mode-hook
+                         '(semantic-mode
+                           spacemacs//python-imenu-create-index-use-semantic))
   (defadvice semantic-python-get-system-include-path
       (around semantic-python-skip-error-advice activate)
     "Don't cause error when Semantic cannot retrieve include

    :defer t
    :init
    (progn
     (spacemacs/set-leader-keys-for-major-mode 'python-mode
       "Va" 'pyvenv-activate
       "Vd" 'pyvenv-deactivate
       "Vw" 'pyvenv-workon)
     (spacemacs/set-leader-keys-for-major-mode 'hy-mode
       "Va" 'pyvenv-activate
       "Vd" 'pyvenv-deactivate
       "Vw" 'pyvenv-workon))))

(defun python/init-pylookup ()
  (use-package pylookup

(defun python/pre-init-xcscope ()
  (spacemacs|use-package-add-hook xcscope
    :post-init
    (spacemacs/set-leader-keys-for-major-mode 'python-mode
      "gi" 'cscope/run-pycscope)))
