2013-06-12 20 views
0

我配置我的Emacs 24.3在Windows下使用Python自带的Emacs 24.3 python.el Python语法高亮奇怪的问题,以下是我在init.el在emacs的

;;; python IDE 
;;; setup jedi and autocomplete for python 
(require 'jedi) 
(add-hook 'python-mode-hook 'jedi:setup) 
(setq jedi:setup-keys 1) 
(setq jedi:tooltip-method nil) 
(add-hook 'python-mode-hook 'auto-complete-mode) 
;; (add-hook 'after-init-hook #'global-flycheck-mode) ; flycheck for python 
;;; setup ipython for default interpreter 
(require 'python) 
(require 'ein) 
;;; setup ein for ipython notebook support 
(setq ein:use-auto-complete-superpack t) 
(add-hook 'ein:connect-mode-hook 'ein:jedi-setup) 
(setq python-shell-interpreter "C:/Python27/python") 
(setq python-shell-interpreter-args "-i C:/Python27/Scripts/ipython-script.py --pylab") 
(setq python-shell-prompt-regexp "In \\[[0-9]+\\]: ") 
(setq python-shell-prompt-output-regexp "Out\\[[0-9]+\\]: ") 
(setq python-shell-completion-setup-code 
     "from IPython.core.completerlib import module_completion") 
(setq python-shell-completion-module-string-code 
     "';'.join(module_completion('''%s'''))\n") 
(setq python-shell-completion-string-code 
    "';'.join(get_ipython().Completer.all_completions('''%s'''))\n") 

片段为Python IDE配置它工作正常,但我有奇怪的问题,如图所示的语法突出显示。一些左侧的变量突出显示为红色,而另一些未突出显示... 有什么不对?

Emacs Python mode screenshot

+0

请添加的源代码,所以它可能被检查。谢谢。 –

回答