diff --git a/modules/lang/beancount/autoload/advice.el b/modules/lang/beancount/autoload/advice.el index 6be36edb5..58ed6cd2c 100644 --- a/modules/lang/beancount/autoload/advice.el +++ b/modules/lang/beancount/autoload/advice.el @@ -63,8 +63,9 @@ will theirs, recursively)." (with-current-buffer (let ((win (minibuffer-selected-window))) (if (window-live-p win) (window-buffer win) (current-buffer))) - (with-memoization (alist-get context +beancount--completion-cache) - (+beancount--collect-unique-recursive regexp n context)) + (unless (assq context +beancount--completion-cache) + (with-memoization (alist-get context +beancount--completion-cache) + (+beancount--collect-unique-recursive regexp n context))) (complete-with-action action (sort (hash-table-keys (alist-get context +beancount--completion-cache))