diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2013-09-25 05:10:00 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2013-09-25 05:10:00 +0200 |
commit | 5c08caccbec41d9c14781ece9a336f91da2c7ab8 (patch) | |
tree | 50ba59d50e70e83102a1c37fc2c5b5eedb90f221 /elisp/geiser-base.el | |
parent | 401a15abc2302ccc870c1df386e5b7cb9880ab43 (diff) | |
download | geiser-5c08caccbec41d9c14781ece9a336f91da2c7ab8.tar.gz geiser-5c08caccbec41d9c14781ece9a336f91da2c7ab8.tar.bz2 |
Scheme version checks
And, if you happen to be launching it all the time, a way of skipping
them via a customizable variable.
Should address issue #15.
Diffstat (limited to 'elisp/geiser-base.el')
-rw-r--r-- | elisp/geiser-base.el | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/elisp/geiser-base.el b/elisp/geiser-base.el index 2569034..e564b0f 100644 --- a/elisp/geiser-base.el +++ b/elisp/geiser-base.el @@ -1,6 +1,6 @@ ;;; geiser-base.el --- shared bits -;; Copyright (C) 2009, 2010, 2012 Jose Antonio Ortega Ruiz +;; Copyright (C) 2009, 2010, 2012, 2013 Jose Antonio Ortega Ruiz ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the Modified BSD License. You should @@ -74,5 +74,14 @@ (let ((thing (thing-at-point 'symbol))) (and thing (make-symbol thing)))) +(defun geiser--cut-version (v) + (when (string-match "\\([0-9]+\\.[0-9]\\(?:\\.[0-9]+\\)?\\).*" v) + (match-string 1 v))) + +(defun geiser--version< (v1 v2) + (let ((v1 (geiser--cut-version v1)) + (v2 (geiser--cut-version v2))) + (and v1 v2 (version< v1 v2)))) + (provide 'geiser-base) |