我尝试将pylint和pep8集成到我的emacs24.2中,通过我的.emac中的(require 'python-pep8)
和(require 'python-pylint)
之类的代码,但我得到了如下所示的错误:
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
似乎未定义define-compilation-mode。任何想法?
答案 0 :(得分:3)
看起来python-pep8.el
缺少
(require 'compile)
在顶部。
答案 1 :(得分:0)
我有同样的问题,在我的情况下,pep8在.emacs
中被注释掉了;;(require 'python-pep8)
(require 'python-pylint)
当我删除注释时问题已修复,似乎pylint需要pep8。
(require 'python-pep8)
(require 'python-pylint)