summaryrefslogtreecommitdiff
path: root/lisp/subr.el
diff options
context:
space:
mode:
authorBozhidar Batsov <bozhidar@batsov.com>2013-11-02 11:48:11 +0200
committerBozhidar Batsov <bozhidar@batsov.com>2013-11-02 11:48:11 +0200
commit684d71c6b4df5c250960310b376e7a2fa87b6e91 (patch)
tree043a2d6f7b6c7dfbd3a5dddccd336f895230cac6 /lisp/subr.el
parent0c21fa44f01af50b27618f44c5dc8a4051d6f98b (diff)
* subr.el (version-regexp-alist): Add support for snapshot versions.
Diffstat (limited to 'lisp/subr.el')
-rw-r--r--lisp/subr.el15
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 4df9c9a2a6..05562117a5 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -4478,11 +4478,12 @@ Usually the separator is \".\", but it can be any other string.")
(defconst version-regexp-alist
- '(("^[-_+ ]?alpha$" . -3)
- ("^[-_+]$" . -3) ; treat "1.2.3-20050920" and "1.2-3" as alpha releases
- ("^[-_+ ]cvs$" . -3) ; treat "1.2.3-CVS" as alpha release
- ("^[-_+ ]?beta$" . -2)
- ("^[-_+ ]?\\(pre\\|rcc\\)$" . -1))
+ '(("^[-_+ ]?snapshot$" . -4)
+ ("^[-_+]$" . -4) ; treat "1.2.3-20050920" and "1.2-3" as snapshot releases
+ ("^[-_+ ]?\\(cvs\\|git\\|bzr\\)$" . -4) ; treat "1.2.3-CVS" as snapshot release
+ ("^[-_+ ]?alpha$" . -3)
+ ("^[-_+ ]?beta$" . -2)
+ ("^[-_+ ]?\\(pre\\|rcc\\)$" . -1))
"Specify association between non-numeric version and its priority.
This association is used to handle version string like \"1.0pre2\",
@@ -4490,6 +4491,8 @@ This association is used to handle version string like \"1.0pre2\",
non-numeric part of a version string to an integer. For example:
String Version Integer List Version
+ \"0.9snapshot\" (0 9 -4)
+ \"1.0-git\" (1 0 -4)
\"1.0pre2\" (1 0 -1 2)
\"1.0PRE2\" (1 0 -1 2)
\"22.8beta3\" (22 8 -2 3)
@@ -4546,6 +4549,8 @@ Examples of version conversion:
\"0.9alpha1\" (0 9 -3 1)
\"0.9AlphA1\" (0 9 -3 1)
\"0.9alpha\" (0 9 -3)
+ \"0.9snapshot\" (0 9 -4)
+ \"1.0-git\" (1 0 -4)
See documentation for `version-separator' and `version-regexp-alist'."
(or (and (stringp ver) (> (length ver) 0))