0

Emacs 24.3 に付属の python.el を使用して、Windows で Emacs 24.3 を Python 用に構成しました。以下は、init.el の python IDE 構成のスニペットです。

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

正常に動作しますが、図に示すように構文の強調表示に奇妙な問題が発生しました。左側の変数の一部は赤で強調表示され、一部は強調表示されていません...何が問題なのですか?

Emacs Python モードのスクリーンショット

4

1 に答える 1