Don't enable `yas' globally

* Diminish the number of "Error in post-command-hook
(yas--post-command-handler):
(wrong-number-of-arguments #<subr signal> 1)"
messages.
This commit is contained in:
Gerard Vermeulen 2023-03-28 08:06:35 +02:00
parent ac73e4a2b7
commit 3d19f0fcce
1 changed files with 5 additions and 2 deletions

View File

@ -5796,8 +5796,11 @@ formatter for Python]].
(when (ensure-package-installation 'yasnippet)
;; Set `yas-alias-to-yas/prefix-p' before loading `yasnippet'.
(setopt yas-alias-to-yas/prefix-p nil)
(when (require 'yasnippet nil 'noerror)
(yas-global-mode +1)))
(dolist (hook '(LaTeX-mode-hook
org-mode-hook
python-mode-hook
python-ts-mode-hook))
(add-hook hook #'yas-minor-mode)))
#+end_src
** [[info:autotype#Tempo][Tempo (info)]]