=== modified file 'python-mode.el' --- old/python-mode.el 2012-03-02 18:19:46 +0000 +++ new/python-mode.el 2012-03-03 12:18:22 +0000 @@ -9462,12 +9462,12 @@ (when (and imenu-create-index-p (ignore-errors (require 'imenu))) (setq imenu-create-index-function #'py-imenu-create-index-new) ;; (setq imenu-create-index-function #'py-imenu-create-index) - (setq imenu-generic-expression py-imenu-generic-expression)) - (when (fboundp 'imenu-add-to-menubar) - ;; (imenu-add-to-menubar (format "%s-%s" "IM" mode-name)) - (imenu-add-to-menubar "PyIndex") - ;; (remove-hook 'imenu-add-menubar-index 'python-mode-hook) - (add-hook imenu-create-index-function 'python-mode-hook)) + (setq imenu-generic-expression py-imenu-generic-expression) + (when (fboundp 'imenu-add-to-menubar) + ;; (imenu-add-to-menubar (format "%s-%s" "IM" mode-name)) + (imenu-add-to-menubar "PyIndex") + ;; (remove-hook 'imenu-add-menubar-index 'python-mode-hook) + (add-hook imenu-create-index-function 'python-mode-hook))) (set (make-local-variable 'eldoc-documentation-function) #'python-eldoc-function) (add-hook 'eldoc-mode-hook