summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2013-07-03 13:57:56 -0700
committerCraig Earls <enderw88@gmail.com>2013-07-03 13:57:56 -0700
commit64d6ec675dee74de661768ca98799b37bd917ce0 (patch)
tree9f43cacb1437ea96d6e676a1c4211db8bbc10e33 /lisp
parent63ba45dbaab04722cd59bf610ae77b8334ca213d (diff)
downloadfork-ledger-64d6ec675dee74de661768ca98799b37bd917ce0.tar.gz
fork-ledger-64d6ec675dee74de661768ca98799b37bd917ce0.tar.bz2
fork-ledger-64d6ec675dee74de661768ca98799b37bd917ce0.zip
Add ledger-mode-should-check-version to disable startup checks.
This is for users who are not using the official Ledger, say maybe hedger…
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ledger-exec.el13
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/ledger-exec.el b/lisp/ledger-exec.el
index 34757d99..95b28ec2 100644
--- a/lisp/ledger-exec.el
+++ b/lisp/ledger-exec.el
@@ -35,6 +35,11 @@
"Interface to the Ledger command-line accounting program."
:group 'ledger)
+(defcustom ledger-mode-should-check-version t
+ "Should Ledger-mode verify that the executable is working"
+ :type 'boolean
+ :group 'ledger-exec)
+
(defcustom ledger-binary-path "ledger"
"Path to the ledger executable."
:type 'file
@@ -92,9 +97,11 @@
(defun ledger-check-version ()
"Verify that ledger works and is modern enough."
(interactive)
- (if (setq ledger-works (ledger-version-greater-p ledger-version-needed))
- (message "Good Ledger Version")
- (message "Bad Ledger Version")))
+ (if ledger-mode-should-check-version
+ (if (setq ledger-works (ledger-version-greater-p ledger-version-needed))
+ (message "Good Ledger Version")
+ (message "Bad Ledger Version"))
+ setq ledger-works t))
(provide 'ledger-exec)