From f1f84c8e9eaf238fc9a23f1a3760b8402e28f14e Mon Sep 17 00:00:00 2001 From: Dan Leslie Date: Fri, 14 Aug 2015 08:18:59 -0700 Subject: Closes jaor/geiser#65 geiser--cut-version only supports single-digit minor versions. - Improves the regex to support multiple-digit minor versions. Contributed by @kovrik --- elisp/geiser-base.el | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'elisp') diff --git a/elisp/geiser-base.el b/elisp/geiser-base.el index 034e595..3e248ac 100644 --- a/elisp/geiser-base.el +++ b/elisp/geiser-base.el @@ -7,8 +7,6 @@ ;; have received a copy of the license along with this program. If ;; not, see . - - ;; Settings and vars shared by all geiser modules, including little ;; utilities and emacsen compatibility bits. @@ -29,7 +27,6 @@ (let ((inhibit-changing-match-data t)) (looking-at regexp)))) - ;;; Utilities: (defsubst geiser--chomp (str) @@ -77,7 +74,7 @@ (and thing (make-symbol thing)))) (defun geiser--cut-version (v) - (when (string-match "\\([0-9]+\\.[0-9]\\(?:\\.[0-9]+\\)?\\).*" v) + (when (string-match "\\([0-9]+\\(?:\\.[0-9]+\\.[0-9]+\\)?\\).*" v) (match-string 1 v))) (defun geiser--version< (v1 v2) @@ -85,5 +82,4 @@ (v2 (geiser--cut-version v2))) (and v1 v2 (version< v1 v2)))) - (provide 'geiser-base) -- cgit v1.2.3