Emacs disable auto-complete in python-mode

前端 未结 2 1977
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-18 13:33

I am using Emacs 24 and would like to disable auto-complete mode while in python-mode so it does not conflict with jedi. How do I go about doing this (sadly I do not know Em

2条回答
  •  说谎
    说谎 (楼主)
    2021-01-18 13:45

    (ac-config-default) turns on global-auto-complete-mode, to stop (auto-complete-mode) from being called in python mode you can write an advice for it.

    (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 am not sure this is what you want, since Jedi use auto-complete-mode as Dmitry pointed out in the comment, there should not be conflicts.

提交回复
热议问题