summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ledger.el22
1 files changed, 15 insertions, 7 deletions
diff --git a/lisp/ledger.el b/lisp/ledger.el
index 25bb485b..87d42599 100644
--- a/lisp/ledger.el
+++ b/lisp/ledger.el
@@ -433,7 +433,9 @@ dropped."
;;;###autoload
(define-derived-mode ledger-mode text-mode "Ledger"
- "A mode for editing ledger data files."
+ "A mode for editing ledger data files.
+
+\\{ledger-mode-map}"
(set (make-local-variable 'comment-start) " ; ")
(set (make-local-variable 'comment-end) "")
(set (make-local-variable 'indent-tabs-mode) nil)
@@ -632,8 +634,7 @@ dropped."
(defvar ledger-reconcile-mode-abbrev-table)
-(define-derived-mode ledger-reconcile-mode text-mode "Reconcile"
- "A mode for reconciling ledger entries."
+(defvar ledger-reconcile-mode-map
(let ((map (make-sparse-keymap)))
(define-key map [(control ?m)] 'ledger-reconcile-visit)
(define-key map [return] 'ledger-reconcile-visit)
@@ -647,7 +648,12 @@ dropped."
(define-key map [?p] 'previous-line)
(define-key map [?s] 'ledger-reconcile-save)
(define-key map [?q] 'ledger-reconcile-quit)
- (use-local-map map)))
+ map))
+
+(define-derived-mode ledger-reconcile-mode text-mode "Reconcile"
+ "A mode for reconciling ledger entries.
+
+\\{ledger-reconcile-mode-map}")
;; Context sensitivity
@@ -807,8 +813,7 @@ specified line, returns nil."
(defvar ledger-report-mode-abbrev-table)
-(define-derived-mode ledger-report-mode text-mode "Ledger-Report"
- "A mode for viewing ledger reports."
+(defvar ledger-report-mode-map
(let ((map (make-sparse-keymap)))
(define-key map [? ] 'scroll-up)
(define-key map [backspace] 'scroll-down)
@@ -825,7 +830,10 @@ specified line, returns nil."
'ledger-report-kill)
(define-key map [(control ?c) (control ?l) (control ?e)]
'ledger-report-edit)
- (use-local-map map)))
+ map))
+
+(define-derived-mode ledger-report-mode text-mode "Ledger-Report"
+ "A mode for viewing ledger reports.")
(defun ledger-report-read-name ()
"Read the name of a ledger report to use, with completion.