summaryrefslogtreecommitdiff
path: root/lisp/ldg-init.el
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2013-04-02 23:13:23 -0700
committerCraig Earls <enderw88@gmail.com>2013-04-02 23:13:23 -0700
commit519e57ca1fac01ea057bea8263c6cb06a8ac4e7e (patch)
tree83529f38b2fb22b4ac5e29c3cc4c4c6047be5309 /lisp/ldg-init.el
parent86d0fd87c49e20b0f5262e7ae48234986584b750 (diff)
downloadledger-519e57ca1fac01ea057bea8263c6cb06a8ac4e7e.tar.gz
ledger-519e57ca1fac01ea057bea8263c6cb06a8ac4e7e.tar.bz2
ledger-519e57ca1fac01ea057bea8263c6cb06a8ac4e7e.zip
Consolidated all major regexes into ldg-regex. Only major exception are the regex in ledger context at point.
Diffstat (limited to 'lisp/ldg-init.el')
-rw-r--r--lisp/ldg-init.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/ldg-init.el b/lisp/ldg-init.el
index 8e657323..29839c9e 100644
--- a/lisp/ldg-init.el
+++ b/lisp/ldg-init.el
@@ -22,6 +22,8 @@
;;; Commentary:
;; Determine the ledger environment
+(require 'ldg-regex)
+
(defcustom ledger-init-file-name "~/.ledgerrc"
"Location of the ledger initialization file. nil if you don't have one"
:group 'ledger-exec)
@@ -32,7 +34,7 @@
(with-current-buffer file
(setq ledger-environment-alist nil)
(goto-char (point-min))
- (while (re-search-forward "^--.+?\\($\\|[ ]\\)" nil t )
+ (while (re-search-forward ledger-init-string-regex nil t )
(let ((matchb (match-beginning 0)) ;; save the match data, string-match stamp on it
(matche (match-end 0)))
(end-of-line)