Emacs disables autocomplete in python mode

I am using Emacs 24 and would like to disable autocomplete mode in python mode so that it does not conflict with the Jedi. How do I do this (unfortunately, I do not know Emacs Lisp). The following are the current autocomplete settings in init.el:

;; auto-complete settings
(require 'auto-complete)
(add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
(require 'auto-complete-config)
(ac-config-default)
; Start auto-completion after 2 characters of a word
(setq ac-auto-start 2)
; case sensitivity is important when finding matches
(setq ac-ignore-case nil)

Thank.

+4
source share
1 answer

(ac-config-default)includes global-auto-complete-modeto stop (auto-complete-mode)from calling in python mode, you can write him advice.

(defadvice auto-complete-mode (around disable-auto-complete-for-python)
  (unless (eq major-mode 'python-mode) ad-do-it))

(ad-activate 'auto-complete-mode)

Also, I'm not sure if this is what you want, since the Jedi use auto-complete mode, as Dmitry noted in the comment, there should be no conflicts.

+3
source

All Articles