mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-13 13:13:35 -05:00
perf(org): call yas-reload-all on TAB only once
In cases where the user has an empty snippets library (or no snippets for the mode at point), the expensive `yas-reload-all` function would be called each time you press tab. Fix: #8025
This commit is contained in:
@@ -486,7 +486,8 @@ Made for `org-tab-first-hook'."
|
||||
(evil-emacs-state-p))
|
||||
(or (and (bound-and-true-p yas--tables)
|
||||
(gethash major-mode yas--tables))
|
||||
(progn (yas-reload-all) t))
|
||||
(with-memoization (get 'yas-reload-all 'reloaded)
|
||||
(always (yas-reload-all))))
|
||||
(yas--templates-for-key-at-point))
|
||||
(yas-expand)
|
||||
t)
|
||||
|
Reference in New Issue
Block a user