0

I configured my Emacs 24.3 under Windows for python using the python.el that comes with Emacs 24.3, following is my snippet for python IDE configuration in init.el

;;; 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")

it works fine, but I got strange problem for the syntax highlighting as shown in the picture. some of the variables on the left are highlighted as red, and some are not highlighted... what's wrong there?

Emacs Python mode screenshot

4

1 回答 1

0

python.el 以不同的颜色突出显示分配的左侧。众所周知,它不适用于复杂的 [1]。但看起来你展示的例子很简单(例如xfast_image在第 537 行)。如果您有 Python 代码片段来重现该问题,发送错误报告将有助于 Emacs 开发人员 [2]。

于 2013-06-13T00:31:35.870 回答