diff options
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/subr.el | 18 |
2 files changed, 21 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 111f9b5fded..e4ba2de1504 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2005-09-24 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * subr.el (version-regexp-alist): Extend valid syntax for version | ||
| 4 | strings: allow any of the characters -,_,+ to separate the | ||
| 5 | alpha/beta/rc part from the version part. Doc fix. | ||
| 6 | (version-to-list): Doc fix. Bind case-fold-search to t, as | ||
| 7 | advertised. | ||
| 8 | |||
| 1 | 2005-09-23 David Reitter <david.reitter@gmail.com> | 9 | 2005-09-23 David Reitter <david.reitter@gmail.com> |
| 2 | 10 | ||
| 3 | * mail/mailclient.el: New file. | 11 | * mail/mailclient.el: New file. |
diff --git a/lisp/subr.el b/lisp/subr.el index ab0b052dae2..7bebfd30c04 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -2862,9 +2862,11 @@ Usually the separator is \".\", but it can be any other string.") | |||
| 2862 | 2862 | ||
| 2863 | 2863 | ||
| 2864 | (defvar version-regexp-alist | 2864 | (defvar version-regexp-alist |
| 2865 | '(("^a\\(lpha\\)?$" . -3) | 2865 | '(("^[-_+]?a\\(lpha\\)?$" . -3) |
| 2866 | ("^b\\(eta\\)?$" . -2) | 2866 | ("^[-_+]$" . -3) ; treat "1.2.3-20050920" and "1.2-3" as alpha releases |
| 2867 | ("^\\(pre\\|rc\\)$" . -1)) | 2867 | ("^[-_+]cvs$" . -3) ; treat "1.2.3-CVS" as alpha release |
| 2868 | ("^[-_+]?b\\(eta\\)?$" . -2) | ||
| 2869 | ("^[-_+]?\\(pre\\|rc\\)$" . -1)) | ||
| 2868 | "*Specify association between non-numeric version part and a priority. | 2870 | "*Specify association between non-numeric version part and a priority. |
| 2869 | 2871 | ||
| 2870 | This association is used to handle version string like \"1.0pre2\", | 2872 | This association is used to handle version string like \"1.0pre2\", |
| @@ -2887,6 +2889,9 @@ Each element has the following form: | |||
| 2887 | Where: | 2889 | Where: |
| 2888 | 2890 | ||
| 2889 | REGEXP regexp used to match non-numeric part of a version string. | 2891 | 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. | ||
| 2890 | 2895 | ||
| 2891 | PRIORITY negative integer which indicate the non-numeric priority.") | 2896 | PRIORITY negative integer which indicate the non-numeric priority.") |
| 2892 | 2897 | ||
| @@ -2903,9 +2908,12 @@ The version syntax is given by the following EBNF: | |||
| 2903 | SEPARATOR ::= `version-separator' (which see) | 2908 | SEPARATOR ::= `version-separator' (which see) |
| 2904 | | `version-regexp-alist' (which see). | 2909 | | `version-regexp-alist' (which see). |
| 2905 | 2910 | ||
| 2911 | The NUMBER part is optional if SEPARATOR is a match for an element | ||
| 2912 | in `version-regexp-alist'. | ||
| 2913 | |||
| 2906 | As an example of valid version syntax: | 2914 | As an example of valid version syntax: |
| 2907 | 2915 | ||
| 2908 | 1.0pre2 1.0.7.5 22.8beta3 0.9alpha1 | 2916 | 1.0pre2 1.0.7.5 22.8beta3 0.9alpha1 6.9.30Beta |
| 2909 | 2917 | ||
| 2910 | As an example of invalid version syntax: | 2918 | As an example of invalid version syntax: |
| 2911 | 2919 | ||
| @@ -2928,7 +2936,7 @@ See documentation for `version-separator' and `version-regexp-alist'." | |||
| 2928 | (error "Invalid version string: '%s'" ver)) | 2936 | (error "Invalid version string: '%s'" ver)) |
| 2929 | (save-match-data | 2937 | (save-match-data |
| 2930 | (let ((i 0) | 2938 | (let ((i 0) |
| 2931 | case-fold-search ; ignore case in matching | 2939 | (case-fold-search t) ; ignore case in matching |
| 2932 | lst s al) | 2940 | lst s al) |
| 2933 | (while (and (setq s (string-match "[0-9]+" ver i)) | 2941 | (while (and (setq s (string-match "[0-9]+" ver i)) |
| 2934 | (= s i)) | 2942 | (= s i)) |