summaryrefslogtreecommitdiff
path: root/lisp/ledger-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/ledger-mode.el')
-rw-r--r--lisp/ledger-mode.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/ledger-mode.el b/lisp/ledger-mode.el
index b1df4a6b..28856bd4 100644
--- a/lisp/ledger-mode.el
+++ b/lisp/ledger-mode.el
@@ -179,9 +179,11 @@ With a prefix argument, remove the effective date. "
(if (and (listp arg)
(= 4 (prefix-numeric-value arg)))
(ledger-remove-effective-date)
- (let ((context (car (ledger-context-at-point)))
- (date-string (format-time-string
- (cdr (assoc "date-format" ledger-environment-alist)))))
+ (let* ((context (car (ledger-context-at-point)))
+ (date-format (or
+ (cdr (assoc "date-format" ledger-environment-alist))
+ ledger-default-date-format))
+ (date-string (format-time-string date-format)))
(save-restriction
(narrow-to-region (point-at-bol) (point-at-eol))
(cond