diff options
Diffstat (limited to 'lisp/ledger-reconcile.el')
-rw-r--r-- | lisp/ledger-reconcile.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/ledger-reconcile.el b/lisp/ledger-reconcile.el index 2e8e1ef9..44e60532 100644 --- a/lisp/ledger-reconcile.el +++ b/lisp/ledger-reconcile.el @@ -28,6 +28,7 @@ ;;; Code: (require 'easymenu) +(require 'ledger-init) (defvar ledger-buf nil) (defvar ledger-bufs nil) @@ -64,7 +65,7 @@ reconcile-finish will mark all pending posting cleared." :type 'boolean :group 'ledger-reconcile) -(defcustom ledger-reconcile-default-date-format "%Y/%m/%d" +(defcustom ledger-reconcile-default-date-format ledger-default-date-format "Default date format for the reconcile buffer" :type 'string :group 'ledger-reconcile) @@ -306,15 +307,14 @@ POSTING is used in `ledger-clear-whole-transactions' is nil." (if (looking-at "(") (read (current-buffer)))))))) ;current-buffer is the *temp* created above (if (and ledger-success (> (length xacts) 0)) - (let ((date-format (cdr (assoc "date-format" ledger-environment-alist)))) + (let ((date-format (or (cdr (assoc "date-format" ledger-environment-alist)) + ledger-default-date-format))) (dolist (xact xacts) (dolist (posting (nthcdr 5 xact)) (let ((beg (point)) (where (ledger-marker-where-xact-is xact posting))) (insert (format "%s %-4s %-30s %-30s %15s\n" - (format-time-string (if date-format - date-format - ledger-reconcile-default-date-format) (nth 2 xact)) + (format-time-string date-format (nth 2 xact)) (if (nth 3 xact) (nth 3 xact) "") |