summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/ledger-mode.el2
-rw-r--r--lisp/ledger-schedule.el2
2 files changed, 3 insertions, 1 deletions
diff --git a/lisp/ledger-mode.el b/lisp/ledger-mode.el
index b0f61d5d..6ad9baf7 100644
--- a/lisp/ledger-mode.el
+++ b/lisp/ledger-mode.el
@@ -172,6 +172,7 @@ Can indent, complete or align depending on context."
(define-derived-mode ledger-mode text-mode "Ledger"
"A mode for editing ledger data files."
(ledger-check-version)
+ (ledger-schedule-check-available)
(ledger-post-setup)
(set (make-local-variable 'comment-start) " ; ")
@@ -270,6 +271,7 @@ Can indent, complete or align depending on context."
(define-key map [delete-xact] '(menu-item "Delete Transaction" ledger-delete-current-transaction))
(define-key map [cmp-xact] '(menu-item "Complete Transaction" ledger-fully-complete-xact))
(define-key map [add-xact] '(menu-item "Add Transaction (ledger xact)" ledger-add-transaction :enable ledger-works))
+ (define-key map [add-xact] '(menu-item "Show upcoming transactions" ledger-schedule-upcoming :enable ledger-schedule-available))
(define-key map [sep3] '(menu-item "--"))
(define-key map [stats] '(menu-item "Ledger Statistics" ledger-display-ledger-stats :enable ledger-works))
(define-key map [fold-buffer] '(menu-item "Narrow to REGEX" ledger-occur))))
diff --git a/lisp/ledger-schedule.el b/lisp/ledger-schedule.el
index ce6694d4..53152f39 100644
--- a/lisp/ledger-schedule.el
+++ b/lisp/ledger-schedule.el
@@ -59,7 +59,7 @@
(defsubst between (val low high)
(and (>= val low) (<= val high)))
-(defun ledger-check-schedule-available ()
+(defun ledger-schedule-check-available ()
(setq ledger-schedule-available (and ledger-schedule-file
(file-exists-p ledger-schedule-file))))