summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2013-06-03 08:45:27 -0700
committerCraig Earls <enderw88@gmail.com>2013-06-03 08:45:27 -0700
commit30fe6afebfcde409c53f0d8e4c10dd8ada339b81 (patch)
tree39c72523e79dba23f11958511ae51928b5ee2acb /lisp
parentfda778f2c0ef0da36f1a5917befae73fd8fcddec (diff)
downloadfork-ledger-30fe6afebfcde409c53f0d8e4c10dd8ada339b81.tar.gz
fork-ledger-30fe6afebfcde409c53f0d8e4c10dd8ada339b81.tar.bz2
fork-ledger-30fe6afebfcde409c53f0d8e4c10dd8ada339b81.zip
Completion improvements
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ldg-complete.el14
-rw-r--r--lisp/ldg-mode.el2
2 files changed, 8 insertions, 8 deletions
diff --git a/lisp/ldg-complete.el b/lisp/ldg-complete.el
index 66e707c5..4b8b3beb 100644
--- a/lisp/ldg-complete.el
+++ b/lisp/ldg-complete.el
@@ -174,18 +174,18 @@ Return list."
Does not use ledger xact"
(interactive)
(let* ((name (caar (ledger-parse-arguments)))
- (rest-of-name name)
- xacts)
+ (rest-of-name name)
+ xacts)
(save-excursion
(when (eq 'transaction (ledger-thing-at-point))
- (delete-region (point) (+ (length name) (point)))
- ;; Search backward for a matching payee
+ (delete-region (point) (+ (length name) (point)))
+ ;; Search backward for a matching payee
(when (re-search-backward
(concat "^[0-9/.=-]+\\(\\s-+\\*\\)?\\(\\s-+(.*?)\\)?\\s-+\\(.*"
(regexp-quote name) ".*\\)" ) nil t)
- (setq rest-of-name (match-string 3))
+ (setq rest-of-name (match-string 3))
;; Start copying the postings
- (forward-line)
+ (forward-line)
(while (looking-at ledger-account-any-status-regex)
(setq xacts (cons (buffer-substring-no-properties
(line-beginning-position)
@@ -196,7 +196,7 @@ Does not use ledger xact"
;; Insert rest-of-name and the postings
(when xacts
(save-excursion
- (insert rest-of-name ?\n)
+ (insert rest-of-name ?\n)
(while xacts
(insert (car xacts) ?\n)
(setq xacts (cdr xacts))))
diff --git a/lisp/ldg-mode.el b/lisp/ldg-mode.el
index ebe1e4bd..82d00d29 100644
--- a/lisp/ldg-mode.el
+++ b/lisp/ldg-mode.el
@@ -87,7 +87,7 @@ Can indent, complete or align depending on context."
(if (= (point) (line-beginning-position))
(indent-to ledger-post-account-alignment-column)
(if (and (> (point) 1)
- (looking-back "\\([[:print:]]\\)" 1))
+ (looking-back "\\([^ \t]\\)" 1))
(ledger-pcomplete interactively)
(ledger-post-align-postings))))