summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ledger-mode.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/ledger-mode.el b/lisp/ledger-mode.el
index a85e0759..d14ea370 100644
--- a/lisp/ledger-mode.el
+++ b/lisp/ledger-mode.el
@@ -244,6 +244,13 @@ With a prefix argument, remove the effective date."
(goto-char start)
(search-forward target))))
+(defvar ledger-mode-syntax-table
+ (let ((table (make-syntax-table text-mode-syntax-table)))
+ (modify-syntax-entry ?\; "<" table)
+ (modify-syntax-entry ?\n ">" table)
+ table)
+ "Syntax table in use in `ledger-mode' buffers.")
+
(defvar ledger-mode-map
(let ((map (make-sparse-keymap)))
(define-key map [(control ?c) (control ?a)] 'ledger-add-transaction)
@@ -322,10 +329,10 @@ With a prefix argument, remove the effective date."
["Kill Report" ledger-report-kill ledger-works]))
;;;###autoload
-
(define-derived-mode ledger-mode text-mode "Ledger"
"A mode for editing ledger data files."
(ledger-check-version)
+ (set-syntax-table ledger-mode-syntax-table)
(when (boundp 'font-lock-defaults)
(setq font-lock-defaults
'(ledger-font-lock-keywords t t nil nil