Search code examples
emacspylintpep8

pylint and pep8 not work with emacs24.2?


i try to intergrate pylint and pep8 into my emacs24.2, via some code like (require 'python-pep8) and (require 'python-pylint) in my .emacs.But i got the error as shown below:

Debugger entered--Lisp error: (void-function define-compilation-mode)
   (define-compilation-mode python-pep8-mode "PEP8" (setq python-pep8-last-buffer (current-buffer)) (set (make-local-variable (quote compilation-error-regexp-alist)) python-pep8-regexp-alist) (set (make-local-variable (quote compilation-disable-input)) t))
   eval-buffer(#<buffer  *load*<3>> nil "/home/zhkzyth/.emacs.d/non_forked/python-pep8.el" nil t)  ; Reading at buffer position 2399
   load-with-code-conversion("/home/zhkzyth/.emacs.d/non_forked/python-pep8.el" "/home/zhkzyth/.emacs.d/non_forked/python-pep8.el" nil nil)
 load("non_forked/python-pep8")
 eval-buffer(#<buffer  *load*<2>> nil "/home/zhkzyth/.emacs.d/zhkzyth.el" nil t)  ; Reading at buffer position 1353
 load-with-code-conversion("/home/zhkzyth/.emacs.d/zhkzyth.el" "/home/zhkzyth/.emacs.d/zhkzyth.el" nil nil)
 load("zhkzyth")
 eval-buffer(#<buffer  *load*> nil "/home/zhkzyth/.emacs" nil t)  ; Reading at buffer position 56
 load-with-code-conversion("/home/zhkzyth/.emacs" "/home/zhkzyth/.emacs" t t)
 load("~/.emacs" t t)
 #[0 "\205\262

It seems like the define-compilation-mode is not defined.Any idea ?


Solution

  • Looks like python-pep8.el is missing a

    (require 'compile)
    

    at the top.