summaryrefslogtreecommitdiff
path: root/elisp/geiser-base.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2013-09-25 05:10:00 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2013-09-25 05:10:00 +0200
commit2cb40f5a1f0115a995daa176208f76b674dd523e (patch)
tree815faf64ef3c8a212145a159dd35aaba7023d376 /elisp/geiser-base.el
parent438e26d9e1759b85785637efc0b64e818e289e57 (diff)
downloadgeiser-guile-2cb40f5a1f0115a995daa176208f76b674dd523e.tar.gz
geiser-guile-2cb40f5a1f0115a995daa176208f76b674dd523e.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.el11
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)