pylint #19339 pylint.el : non existing py-mod-map [resolved]

This has been bugged me for a while, I don't feel like using the other python-mode and everytime I enter a python file it bugs me about that non-existent py-mode-map.

I have attached a patch which should make it works for both mode:

--- pylint-0.18.1/elisp/pylint.el.chmou        2009-12-10 14:20:03.574983993 +0000
+++ pylint-0.18.1/elisp/pylint.el      2009-12-10 14:25:00.826238694 +0000
@@ -34,25 +34,28 @@
 ;;  (local-set-key [f1] 'pylint)
 ;;  (local-set-key [f2] 'previous-error)
 ;;  (local-set-key [f3] 'next-error)
+  (let ((map))
+    (if(boundp 'py-mode-map)
+        (setq map py-mode-map)
+      (setq map python-mode-map)
+      (define-key
+        map
+        [menu-bar Python pylint-separator]
+        '("--" . pylint-seperator))

-  (define-key
-    py-mode-map
-    [menu-bar Python pylint-separator]
-    '("--" . pylint-seperator))
-
-  (define-key
-    py-mode-map
-    [menu-bar Python next-error]
-    '("Next error" . next-error))
-  (define-key
-    py-mode-map
-    [menu-bar Python prev-error]
-    '("Previous error" . previous-error))
-  (define-key
-    py-mode-map
-    [menu-bar Python lint]
-    '("Pylint" . pylint))
-
+      (define-key
+        map
+        [menu-bar Python next-error]
+        '("Next error" . next-error))
+      (define-key
+        map
+        [menu-bar Python prev-error]
+        '("Previous error" . previous-error))
+      (define-key
+        map
+        [menu-bar Python lint]
+        '("Pylint" . pylint))
+      ))
   )

 (add-hook 'python-mode-hook 'pylint-python-hook)
prioritynormal
typebug
done in0.20.0
load0.100
load left0.000
closed by<not specified>