From 6539f1e1a972e8ab3d3522c985ce28fa1503dc20 Mon Sep 17 00:00:00 2001 From: Craig Earls Date: Fri, 10 May 2013 13:25:24 -0700 Subject: Reverted changes to completion. Changes were "more correct" but performance on large buffer was too poor. --- lisp/ldg-mode.el | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'lisp/ldg-mode.el') 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 . 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) -- cgit v1.2.3