/[emacs]/emacs/lisp/subr.el
ViewVC logotype

Diff of /emacs/lisp/subr.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.478 by kfstorm, Fri Aug 26 12:31:55 2005 UTC revision 1.479 by eliz, Sat Sep 24 10:40:13 2005 UTC
# Line 2862  Usually the separator is \".\", but it c Line 2862  Usually the separator is \".\", but it c
2862    
2863    
2864  (defvar version-regexp-alist  (defvar version-regexp-alist
2865    '(("^a\\(lpha\\)?$"   . -3)    '(("^[-_+]?a\\(lpha\\)?$"   . -3)
2866      ("^b\\(eta\\)?$"    . -2)      ("^[-_+]$" . -3)    ; treat "1.2.3-20050920" and "1.2-3" as alpha releases
2867      ("^\\(pre\\|rc\\)$" . -1))      ("^[-_+]cvs$" . -3) ; treat "1.2.3-CVS" as alpha release
2868        ("^[-_+]?b\\(eta\\)?$"    . -2)
2869        ("^[-_+]?\\(pre\\|rc\\)$" . -1))
2870    "*Specify association between non-numeric version part and a priority.    "*Specify association between non-numeric version part and a priority.
2871    
2872  This association is used to handle version string like \"1.0pre2\",  This association is used to handle version string like \"1.0pre2\",
# Line 2887  Each element has the following form: Line 2889  Each element has the following form:
2889  Where:  Where:
2890    
2891  REGEXP          regexp used to match non-numeric part of a version string.  REGEXP          regexp used to match non-numeric part of a version string.
2892                    It should begin with a `^' anchor and end with a `$' to
2893                    prevent false hits.  Letter-case is ignored while matching
2894                    REGEXP.
2895    
2896  PRIORITY        negative integer which indicate the non-numeric priority.")  PRIORITY        negative integer which indicate the non-numeric priority.")
2897    
# Line 2903  The version syntax is given by the follo Line 2908  The version syntax is given by the follo
2908     SEPARATOR ::= `version-separator' (which see)     SEPARATOR ::= `version-separator' (which see)
2909                 | `version-regexp-alist' (which see).                 | `version-regexp-alist' (which see).
2910    
2911    The NUMBER part is optional if SEPARATOR is a match for an element
2912    in `version-regexp-alist'.
2913    
2914  As an example of valid version syntax:  As an example of valid version syntax:
2915    
2916     1.0pre2   1.0.7.5   22.8beta3   0.9alpha1     1.0pre2   1.0.7.5   22.8beta3   0.9alpha1   6.9.30Beta
2917    
2918  As an example of invalid version syntax:  As an example of invalid version syntax:
2919    
# Line 2928  See documentation for `version-separator Line 2936  See documentation for `version-separator
2936        (error "Invalid version string: '%s'" ver))        (error "Invalid version string: '%s'" ver))
2937    (save-match-data    (save-match-data
2938      (let ((i 0)      (let ((i 0)
2939            case-fold-search              ; ignore case in matching            (case-fold-search t)          ; ignore case in matching
2940            lst s al)            lst s al)
2941        (while (and (setq s (string-match "[0-9]+" ver i))        (while (and (setq s (string-match "[0-9]+" ver i))
2942                    (= s i))                    (= s i))

Legend:
Removed from v.1.478  
changed lines
  Added in v.1.479

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26