Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
vkazanov committed May 23, 2024
1 parent e00ab95 commit 283e678
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions beancount.el
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,9 @@ current buffer to a position of the match beginning."
(defun beancount-get-account-names ()
"Return a list of known account names available in the buffer."
(when (null beancount-accounts)
;; Collecting a full list and then deduping it is a heavy
;; operation. But because of caching the will only happen once -
;; whenever a completion is requested.
(setq beancount-accounts
(sort (beancount-collect-unique beancount-account-regexp 0) #'string<)))
beancount-accounts)
Expand Down

0 comments on commit 283e678

Please sign in to comment.