summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2015-04-05 09:41:44 -0700
committerCraig Earls <enderw88@gmail.com>2015-04-05 09:41:44 -0700
commit17a267e1017a7448a364738e5c7eafaa820c622b (patch)
treeb6e8e766f455bf9357b41108ba2edda13fd8a40a /lisp
parent1f803d629491991afb8aa9cd1d159313b2af78c7 (diff)
parentdd6185a12091045831fc3e0a0c36217e44762333 (diff)
downloadfork-ledger-17a267e1017a7448a364738e5c7eafaa820c622b.tar.gz
fork-ledger-17a267e1017a7448a364738e5c7eafaa820c622b.tar.bz2
fork-ledger-17a267e1017a7448a364738e5c7eafaa820c622b.zip
Merge commit 'dd6185a12091045831fc3e0a0c36217e44762333' into next
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ledger-context.el4
-rw-r--r--lisp/ledger-reconcile.el10
2 files changed, 10 insertions, 4 deletions
diff --git a/lisp/ledger-context.el b/lisp/ledger-context.el
index 0dfa4645..643ebdd3 100644
--- a/lisp/ledger-context.el
+++ b/lisp/ledger-context.el
@@ -32,9 +32,9 @@
;; `ledger-single-line-config' macro to form the regex and list of
;; elements
(defconst ledger-indent-string "\\(^[ \t]+\\)")
-(defconst ledger-status-string "\\([*! ]?\\)")
+(defconst ledger-status-string "\\(* \\|! \\)?")
(defconst ledger-account-string "[\\[(]?\\(.*?\\)[])]?")
-(defconst ledger-separator-string "\\s-\\s-")
+(defconst ledger-separator-string "\\s-\\s-+")
(defconst ledger-amount-string "\\(-?[0-9]+[\\.,][0-9]*\\)")
(defconst ledger-comment-string "[ \t]*;[ \t]*\\(.*?\\)")
(defconst ledger-nil-string "\\([ \t]\\)")
diff --git a/lisp/ledger-reconcile.el b/lisp/ledger-reconcile.el
index 18e0128a..8c190aba 100644
--- a/lisp/ledger-reconcile.el
+++ b/lisp/ledger-reconcile.el
@@ -118,6 +118,11 @@ Possible values are '(date)', '(amount)', '(payee)' or '(0)' for no sorting, i.e
:type 'boolean
:group 'ledger-reconcile)
+(defcustom ledger-reconcile-finish-force-quit nil
+ "If t, will force closing reconcile window after \\[ledger-reconcile-finish]."
+ :type 'boolean
+ :group 'ledger-reconcile)
+
;; s-functions below are copied from Magnars' s.el
;; prefix ledger-reconcile- is added to not conflict with s.el
(defun ledger-reconcile-s-pad-left (len padding s)
@@ -314,7 +319,7 @@ Return the number of uncleared xacts found."
(defun ledger-reconcile-finish ()
"Mark all pending posting or transactions as cleared.
Depends on ledger-reconcile-clear-whole-transactions, save the buffers
-and exit reconcile mode"
+and exit reconcile mode if `ledger-reconcile-finish-force-quit'"
(interactive)
(save-excursion
(goto-char (point-min))
@@ -327,7 +332,8 @@ and exit reconcile mode"
(ledger-toggle-current 'cleared))))
(forward-line 1)))
(ledger-reconcile-save)
- (ledger-reconcile-quit))
+ (when ledger-reconcile-finish-force-quit
+ (ledger-reconcile-quit)))
(defun ledger-reconcile-quit ()