 	    (if py-beep-if-tab-change (beep)))))
     (goto-char start))
 
-  (run-hooks 'py-mode-hook))
+  (if python-mode-hook
+      (run-hooks 'python-mode-hook)
+    (run-hooks 'py-mode-hook)))
 
 ;;; Functions that execute Python commands in a subprocess
 

    ;; else arrange for our hook to run theirs
    (setq py-inherited-kill-emacs-hook kill-emacs-hook)
    (setq kill-emacs-hook 'py-kill-emacs-hook)))

(defvar py-beep-if-tab-change t
  "*Ring the bell if tab-width is changed.

;;; Major mode for editing Python programs, version 1.10
;; by: Tim Peters <tim@ksr.com>
;; after an original idea by: Michael A. Guravage
;;
