summaryrefslogtreecommitdiff
path: root/lisp/ledger.el
diff options
context:
space:
mode:
authorRémi Vanicat <vanicat@debian.org>2011-04-06 19:40:40 +0200
committerRémi Vanicat <vanicat@debian.org>2011-04-06 19:40:40 +0200
commit75e4dd4757c4aaca75f6cf3cb0fb513a4beed2fe (patch)
tree76066e271445cf0491eac73377b8fdce3d31bd7d /lisp/ledger.el
parent3896214336c880a8dcb13b79b01f616f25403919 (diff)
downloadfork-ledger-75e4dd4757c4aaca75f6cf3cb0fb513a4beed2fe.tar.gz
fork-ledger-75e4dd4757c4aaca75f6cf3cb0fb513a4beed2fe.tar.bz2
fork-ledger-75e4dd4757c4aaca75f6cf3cb0fb513a4beed2fe.zip
Add keybinding to the modes documentation.
Diffstat (limited to 'lisp/ledger.el')
-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.