Variable: version-regexp-alist

version-regexp-alist is a variable defined in subr.el.gz.

Value

(("^[-._+ ]?snapshot$" . -4)
 ("^[-._+]$" . -4)
 ("^[-._+ ]?\\(cvs\\|git\\|bzr\\|svn\\|hg\\|darcs\\)$" . -4)
 ("^[-._+ ]?unknown$" . -4)
 ("^[-._+ ]?alpha$" . -3)
 ("^[-._+ ]?beta$" . -2)
 ("^[-._+ ]?\\(pre\\|rc\\)$" . -1))

Documentation

Specify association between non-numeric version and its priority.

This association is used to handle version string like "1.0pre2",
"0.9alpha1", etc. It's used by version-to-list (which see) to convert the
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.0.cvs" (1 0 -4)
   "1.0pre2" (1 0 -1 2)
   "1.0PRE2" (1 0 -1 2)
   "22.8beta3" (22 8 -2 3)
   "22.8 Beta3" (22 8 -2 3)
   "0.9alpha1" (0 9 -3 1)
   "0.9AlphA1" (0 9 -3 1)
   "0.9 alpha" (0 9 -3)

Each element has the following form:

   (REGEXP . PRIORITY)

Where:

REGEXP regexp used to match non-numeric part of a version string.
It should begin with the ^ anchor and end with a $ to
prevent false hits. Letter-case is ignored while matching
REGEXP.

PRIORITY a negative integer specifying non-numeric priority of REGEXP.

Source Code

;; Defined in /usr/src/emacs/lisp/subr.el.gz
(defconst version-regexp-alist
  '(("^[-._+ ]?snapshot$"                                 . -4)
    ;; treat "1.2.3-20050920" and "1.2-3" as snapshot releases
    ("^[-._+]$"                                           . -4)
    ;; treat "1.2.3-CVS" as snapshot release
    ("^[-._+ ]?\\(cvs\\|git\\|bzr\\|svn\\|hg\\|darcs\\)$" . -4)
    ;; treat "-unknown" the same as snapshots.
    ("^[-._+ ]?unknown$"                                  . -4)
    ("^[-._+ ]?alpha$"                                    . -3)
    ("^[-._+ ]?beta$"                                     . -2)
    ("^[-._+ ]?\\(pre\\|rc\\)$"                           . -1))
  "Specify association between non-numeric version and its priority.

This association is used to handle version string like \"1.0pre2\",
\"0.9alpha1\", etc.  It's used by `version-to-list' (which see) to convert the
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.0.cvs\"         (1  0 -4)
   \"1.0pre2\"         (1  0 -1 2)
   \"1.0PRE2\"         (1  0 -1 2)
   \"22.8beta3\"       (22 8 -2 3)
   \"22.8 Beta3\"      (22 8 -2 3)
   \"0.9alpha1\"       (0  9 -3 1)
   \"0.9AlphA1\"       (0  9 -3 1)
   \"0.9 alpha\"       (0  9 -3)

Each element has the following form:

   (REGEXP . PRIORITY)

Where:

REGEXP		regexp used to match non-numeric part of a version string.
		It should begin with the `^' anchor and end with a `$' to
		prevent false hits.  Letter-case is ignored while matching
		REGEXP.

PRIORITY	a negative integer specifying non-numeric priority of REGEXP.")