From 64d6ec675dee74de661768ca98799b37bd917ce0 Mon Sep 17 00:00:00 2001 From: Craig Earls Date: Wed, 3 Jul 2013 13:57:56 -0700 Subject: Add ledger-mode-should-check-version to disable startup checks. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is for users who are not using the official Ledger, say maybe hedger… --- lisp/ledger-exec.el | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'lisp') 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) -- cgit v1.2.3