From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.bugs Subject: bug#22046: [PATCH] Improve version-to-list parsing Date: Mon, 30 Nov 2015 08:59:04 +0100 Message-ID: <87zixvlxyv.fsf@igel.home> References: <83y4dgma7k.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1448870422 27643 80.91.229.3 (30 Nov 2015 08:00:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Nov 2015 08:00:22 +0000 (UTC) Cc: 22046@debbugs.gnu.org To: Alex Dunn Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 30 09:00:08 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a3JNY-000744-7x for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Nov 2015 09:00:08 +0100 Original-Received: from localhost ([::1]:39411 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3JNc-0003dU-Lr for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Nov 2015 03:00:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3JNZ-0003bM-7s for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2015 03:00:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3JNV-0007iP-4g for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2015 03:00:09 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42092) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3JNV-0007iF-2O for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2015 03:00:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1a3JNU-00060G-9a for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2015 03:00:04 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Schwab Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Nov 2015 08:00:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22046 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 22046-submit@debbugs.gnu.org id=B22046.144887037123007 (code B ref 22046); Mon, 30 Nov 2015 08:00:04 +0000 Original-Received: (at 22046) by debbugs.gnu.org; 30 Nov 2015 07:59:31 +0000 Original-Received: from localhost ([127.0.0.1]:60033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a3JMw-0005z1-GR for submit@debbugs.gnu.org; Mon, 30 Nov 2015 02:59:30 -0500 Original-Received: from mail-out.m-online.net ([212.18.0.10]:41829) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a3JMb-0005ya-MA for 22046@debbugs.gnu.org; Mon, 30 Nov 2015 02:59:28 -0500 Original-Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3p8JqG44xSz3hmlC; Mon, 30 Nov 2015 08:59:06 +0100 (CET) Original-Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3p8JqF6k1nzvh28; Mon, 30 Nov 2015 08:59:05 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Original-Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id 1v-1edV2IYqJ; Mon, 30 Nov 2015 08:59:05 +0100 (CET) X-Auth-Info: p68XtOQHWbByEhAerFRKKpF2ftUXWBqVIhuVg4CtXfUCoKd1r8OvexGy+0GysZ1X Original-Received: from igel.home (ppp-88-217-27-100.dynamic.mnet-online.de [88.217.27.100]) by mail.mnet-online.de (Postfix) with ESMTPA; Mon, 30 Nov 2015 08:59:04 +0100 (CET) Original-Received: by igel.home (Postfix, from userid 1000) id 8A7EA2C3075; Mon, 30 Nov 2015 08:59:04 +0100 (CET) X-Yow: Hey, waiter! I want a NEW SHIRT and a PONY TAIL with lemon sauce! In-Reply-To: (Alex Dunn's message of "Sun, 29 Nov 2015 19:54:18 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:109435 Archived-At: Alex Dunn writes: > diff --git a/lisp/subr.el b/lisp/subr.el > index 74d6aa1..dd3bac6 100644 > --- a/lisp/subr.el > +++ b/lisp/subr.el > @@ -4686,14 +4686,14 @@ version-separator > > > (defconst version-regexp-alist > - '(("^[-\._+ ]?snapshot$" . -4) > + '(("^[-\._+ ]?snapshot" . -4) > ;; treat "1.2.3-20050920" and "1.2-3" as snapshot releases > - ("^[-\._+]$" . -4) > + ("^[-\._+]" . -4) > ;; treat "1.2.3-CVS" as snapshot release > - ("^[-\._+ ]?\\(cvs\\|git\\|bzr\\|svn\\|hg\\|darcs\\)$" . -4) > - ("^[-\._+ ]?alpha$" . -3) > - ("^[-\._+ ]?beta$" . -2) > - ("^[-\._+ ]?\\(pre\\|rc\\)$" . -1)) > + ("^[-\._+ ]?\\(cvs\\|git\\|bzr\\|svn\\|hg\\|darcs\\)" . -4) > + ("^[-\._+ ]?alpha" . -3) > + ("^[-\._+ ]?beta" . -2) > + ("^[-\._+ ]?\\(pre\\|rc\\)" . -1)) > "Specify association between non-numeric version and its priority. Is that part of the doc string no longer true? 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. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."