Fix #3787: only inhibit some hooks for org-src ops

Inhibiting all MAJOR-MODE-hook functions (to fix #3660) would mean
inhibiting some useful functionality, like indentation or syntax
highlighting modes. We only want to inhibit expensive hooks. Since Doom
adds these to MAJOR-MODE-local-vars-hook by convention, we can
selectively inhibit those instead.
This commit is contained in:
Henrik Lissner 2020-08-20 01:48:49 -04:00
parent 4841062db9
commit dddfd9a7b1
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 10 additions and 8 deletions

View file

@ -247,7 +247,7 @@ called.")
(pyenv-mode +1)
(when (executable-find "pyenv")
(add-to-list 'exec-path (expand-file-name "shims" (or (getenv "PYENV_ROOT") "~/.pyenv"))))
(add-hook 'python-mode-hook #'+python-pyenv-mode-set-auto-h)
(add-hook 'python-mode-local-vars-hook #'+python-pyenv-mode-set-auto-h)
(add-hook 'doom-switch-buffer-hook #'+python-pyenv-mode-set-auto-h))