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配置它工作正常,但我有奇怪的問題,如圖所示的語法突出顯示。一些左側的變量突出顯示爲紅色,而另一些未突出顯示... 有什麼不對?
請添加的源代碼,所以它可能被檢查。謝謝。 –