diff options
author | Craig Earls <enderw88@gmail.com> | 2013-05-10 13:25:24 -0700 |
---|---|---|
committer | Craig Earls <enderw88@gmail.com> | 2013-05-10 13:25:24 -0700 |
commit | 6539f1e1a972e8ab3d3522c985ce28fa1503dc20 (patch) | |
tree | 1d8a49a5d8b341bde3f1322bc367770df000b387 /lisp/ldg-mode.el | |
parent | 60e606a651f694723a69d30eb78ded5de0454b74 (diff) | |
download | fork-ledger-6539f1e1a972e8ab3d3522c985ce28fa1503dc20.tar.gz fork-ledger-6539f1e1a972e8ab3d3522c985ce28fa1503dc20.tar.bz2 fork-ledger-6539f1e1a972e8ab3d3522c985ce28fa1503dc20.zip |
Reverted changes to completion. Changes were "more correct" but performance on large buffer was too poor.
Diffstat (limited to 'lisp/ldg-mode.el')
-rw-r--r-- | lisp/ldg-mode.el | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/lisp/ldg-mode.el b/lisp/ldg-mode.el index 75b842e2..f7e3d0e6 100644 --- a/lisp/ldg-mode.el +++ b/lisp/ldg-mode.el @@ -84,18 +84,12 @@ And calculate the target-delta of the account being reconciled." "Decide what to with with <TAB>. Can indent, complete or align depending on context." (interactive "p") - (when (= (point) (line-end-position)) - (if (= (point) (line-beginning-position)) - (indent-to ledger-post-account-alignment-column) - (save-excursion - (re-search-backward - (rx-static-or ledger-account-any-status-regex - ledger-metadata-regex - ledger-payee-any-status-regex) - (line-beginning-position) t)) - (when (= (point) (match-end 0)) - (ledger-pcomplete interactively)))) - (ledger-post-align-postings)) + (if (= (point) (line-beginning-position)) + (indent-to ledger-post-account-alignment-column) + (if (and (> (point) 1) + (looking-back "[:A-Za-z0-9]" 1)) + (ledger-pcomplete interactively) + (ledger-post-align-postings)))) (defvar ledger-mode-abbrev-table) |