aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/subr.el15
2 files changed, 16 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a1564ac4a5f..d4ba7de1635 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12010-08-29 Chong Yidong <cyd@stupidchicken.com>
2
3 * subr.el (version-regexp-alist): Don't use "a" and "b" for
4 "alpha" and "beta".
5 (version-to-list): Handle versions like "10.3d".
6
12010-08-28 Stefan Monnier <monnier@iro.umontreal.ca> 72010-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
2 8
3 * emacs-lisp/macroexp.el (macroexpand-all-1): Use pcase. 9 * emacs-lisp/macroexp.el (macroexpand-all-1): Use pcase.
diff --git a/lisp/subr.el b/lisp/subr.el
index 90480ea0e7f..0852ec58b5a 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -3584,11 +3584,11 @@ Usually the separator is \".\", but it can be any other string.")
3584 3584
3585 3585
3586(defconst version-regexp-alist 3586(defconst version-regexp-alist
3587 '(("^[-_+ ]?a\\(lpha\\)?$" . -3) 3587 '(("^[-_+ ]?alpha$" . -3)
3588 ("^[-_+]$" . -3) ; treat "1.2.3-20050920" and "1.2-3" as alpha releases 3588 ("^[-_+]$" . -3) ; treat "1.2.3-20050920" and "1.2-3" as alpha releases
3589 ("^[-_+ ]cvs$" . -3) ; treat "1.2.3-CVS" as alpha release 3589 ("^[-_+ ]cvs$" . -3) ; treat "1.2.3-CVS" as alpha release
3590 ("^[-_+ ]?b\\(eta\\)?$" . -2) 3590 ("^[-_+ ]?beta$" . -2)
3591 ("^[-_+ ]?\\(pre\\|rc\\)$" . -1)) 3591 ("^[-_+ ]?\\(pre\\|rcc\\)$" . -1))
3592 "*Specify association between non-numeric version and its priority. 3592 "*Specify association between non-numeric version and its priority.
3593 3593
3594This association is used to handle version string like \"1.0pre2\", 3594This association is used to handle version string like \"1.0pre2\",
@@ -3681,8 +3681,13 @@ See documentation for `version-separator' and `version-regexp-alist'."
3681 (setq al version-regexp-alist) 3681 (setq al version-regexp-alist)
3682 (while (and al (not (string-match (caar al) s))) 3682 (while (and al (not (string-match (caar al) s)))
3683 (setq al (cdr al))) 3683 (setq al (cdr al)))
3684 (or al (error "Invalid version syntax: '%s'" ver)) 3684 (cond (al
3685 (setq lst (cons (cdar al) lst))))) 3685 (push (cdar al) lst))
3686 ;; Convert 22.3a to 22.3.1.
3687 ((string-match "^[-_+ ]?\\([a-zA-Z]\\)$" s)
3688 (push (- (aref (downcase (match-string 1 s)) 0) ?a -1)
3689 lst))
3690 (t (error "Invalid version syntax: '%s'" ver))))))
3686 (if (null lst) 3691 (if (null lst)
3687 (error "Invalid version syntax: '%s'" ver) 3692 (error "Invalid version syntax: '%s'" ver)
3688 (nreverse lst))))) 3693 (nreverse lst)))))