From 9f694169a87d74f204967b68f3822685f5450bad Mon Sep 17 00:00:00 2001 From: Moritz Ulrich Date: Mon, 30 Dec 2013 01:41:31 +0100 Subject: ledger-mode: Introduce `ledger-default-date-format'. Some elisp functions depend on a date-format supplied in ~/.ledgerrc. Change these by introducing a default ("%Y/%m/%d"). Signed-off-by: Moritz Ulrich --- lisp/ledger-schedule.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lisp/ledger-schedule.el') diff --git a/lisp/ledger-schedule.el b/lisp/ledger-schedule.el index ce77f26b..c9ee4392 100644 --- a/lisp/ledger-schedule.el +++ b/lisp/ledger-schedule.el @@ -30,6 +30,8 @@ ;; function slot of the symbol VARNAME. Then use VARNAME as the ;; function without have to use funcall. +(require 'ledger-init) + (defgroup ledger-schedule nil "Support for automatically recommendation transactions." :group 'ledger) @@ -288,7 +290,8 @@ returns true if the date meets the requirements" "Format CANDIDATE-ITEMS for display." (let ((candidates (ledger-schedule-list-upcoming-xacts candidate-items early horizon)) (schedule-buf (get-buffer-create ledger-schedule-buffer-name)) - (date-format (cdr (assoc "date-format" ledger-environment-alist)))) + (date-format (or (cdr (assoc "date-format" ledger-environment-alist)) + ledger-default-date-format))) (with-current-buffer schedule-buf (erase-buffer) (dolist (candidate candidates) -- cgit v1.2.3