summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ledger-reconcile.el3
-rw-r--r--lisp/ledger-schedule.el10
2 files changed, 6 insertions, 7 deletions
diff --git a/lisp/ledger-reconcile.el b/lisp/ledger-reconcile.el
index 326266b7..8c190aba 100644
--- a/lisp/ledger-reconcile.el
+++ b/lisp/ledger-reconcile.el
@@ -446,7 +446,8 @@ Return a count of the uncleared transactions."
(fmt (ledger-reconcile-compile-format-string ledger-reconcile-buffer-line-format)))
(if (and ledger-success (> (length xacts) 0))
(progn
- (insert (format ledger-reconcile-buffer-header account))
+ (if ledger-reconcile-buffer-header
+ (insert (format ledger-reconcile-buffer-header account)))
(dolist (xact xacts)
(ledger-reconcile-format-xact xact fmt))
(goto-char (point-max))
diff --git a/lisp/ledger-schedule.el b/lisp/ledger-schedule.el
index 1fbbcb59..b715a487 100644
--- a/lisp/ledger-schedule.el
+++ b/lisp/ledger-schedule.el
@@ -202,12 +202,10 @@ the transaction should be logged for that day."
(defun ledger-schedule-compile-constraints (descriptor-string)
"Return a list with the year, month and day fields split."
(let ((fields (split-string descriptor-string "[/\\-]" t)))
- (if (string-match "[A-Za-z]" descriptor-string)
- (ledger-schedule-constrain-day (nth 0 fields) (nth 1 fields) (nth 2 fields))
- (list 'and
- (ledger-schedule-constrain-day (nth 0 fields) (nth 1 fields) (nth 2 fields))
- (ledger-schedule-constrain-year (nth 0 fields) (nth 1 fields) (nth 2 fields))
- (ledger-schedule-constrain-month (nth 0 fields) (nth 1 fields) (nth 2 fields))))))
+ (list 'and
+ (ledger-schedule-constrain-day (nth 0 fields) (nth 1 fields) (nth 2 fields))
+ (ledger-schedule-constrain-year (nth 0 fields) (nth 1 fields) (nth 2 fields))
+ (ledger-schedule-constrain-month (nth 0 fields) (nth 1 fields) (nth 2 fields)))))
(defun ledger-schedule-constrain-year (year-desc month-desc day-desc)
"Return a form that constrains the year.