branch: elpa/beancount commit dfd402ef79b70cc47c6b2e4c60e9a9fd186e9a95 Author: Ranjeeth Mahankali <ranjeethmahank...@gmail.com> Commit: Martin Blais <bl...@furius.ca>
Autocomplete the second account in a pad directive --- beancount.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/beancount.el b/beancount.el index b94f7cfab5..8c557ca1cd 100644 --- a/beancount.el +++ b/beancount.el @@ -519,6 +519,15 @@ With an argument move to the previous non cleared transaction." (setq beancount-accounts nil) (list (match-beginning 1) (match-end 1) #'beancount-account-completion-table)) + ;; pad directive followed by two accounts + ((beancount-looking-at + (concat "^" beancount-date-regexp + "\\s-+" (regexp-opt '("pad")) + "\\s-+\\([" beancount-account-chars "]*\\)" + "\\s-+\\([" beancount-account-chars "]*\\)") 2 pos) + (setq beancount-accounts nil) + (list (match-beginning 2) (match-end 2) #'beancount-account-completion-table)) + ;; posting ((and (beancount-looking-at (concat "[ \t]+\\([" beancount-account-chars "]*\\)") 1 pos)