[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ispell.el doesn't work any more
From: |
Eli Zaretskii |
Subject: |
Re: ispell.el doesn't work any more |
Date: |
Sat, 17 Sep 2005 13:54:41 +0300 |
> From: Juri Linkov <address@hidden>
> Date: Fri, 16 Sep 2005 01:01:48 +0300
> Cc: address@hidden, address@hidden
>
> > That approach seems good to me. It will work with aspell 0.50 as
> > well as it would have worked with ispell.
> >
> > Does anyone see a problem with that patch?
>
> This patch seems good for versions older than 0.60, but now I get
> another error for version numbers greater than 0.60:
>
> Debugger entered--Lisp error: (error "Invalid version syntax:
> '0.60.3-20050121'")
> signal(error ("Invalid version syntax: '0.60.3-20050121'"))
> error("Invalid version syntax: '%s'" "0.60.3-20050121")
> version-to-list("0.60.3-20050121")
> version<("0.60.3-20050121" "0.60")
> ispell-check-version()
> ispell-init-process()
> ispell-buffer-local-words()
> ispell-accept-buffer-local-defs()
> ispell-word(nil nil nil)
> call-interactively(ispell-word)
That's because version-to-list doesn't support this syntax of version
numbers. In addition, it isn't case-insensitive to strings it does
support, like "alpha".
So how about the following patch, which fixes the case-fold issue,
improves the doc string, and extends the valid syntax for version
numbers?
Index: lisp/subr.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/subr.el,v
retrieving revision 1.478
diff -u -r1.478 subr.el
--- lisp/subr.el 26 Aug 2005 12:31:55 -0000 1.478
+++ lisp/subr.el 17 Sep 2005 10:52:52 -0000
@@ -2862,9 +2862,11 @@
(defvar version-regexp-alist
- '(("^a\\(lpha\\)?$" . -3)
- ("^b\\(eta\\)?$" . -2)
- ("^\\(pre\\|rc\\)$" . -1))
+ '(("^[-_]?a\\(lpha\\)?$" . -3)
+ ("^[-_]$" . -3) ; treat "1.2.3-20050920" and "1.2-3" as alpha releases
+ ("^[-_]cvs$" . -3) ; treat "1.2.3-CVS" as alpha release
+ ("^[-_]?b\\(eta\\)?$" . -2)
+ ("^[-_]?\\(pre\\|rc\\)$" . -1))
"*Specify association between non-numeric version part and a priority.
This association is used to handle version string like \"1.0pre2\",
@@ -2887,6 +2889,9 @@
Where:
REGEXP regexp used to match non-numeric part of a version string.
+ It should begin with a `^' anchor and end with a `$' to
+ prevent false hits. Letter-case is ignored while matching
+ REGEXP.
PRIORITY negative integer which indicate the non-numeric priority.")
@@ -2903,9 +2908,12 @@
SEPARATOR ::= `version-separator' (which see)
| `version-regexp-alist' (which see).
+The NUMBER part is optional if SEPARATOR is a match for an element
+in `version-regexp-alist'.
+
As an example of valid version syntax:
- 1.0pre2 1.0.7.5 22.8beta3 0.9alpha1
+ 1.0pre2 1.0.7.5 22.8beta3 0.9alpha1 6.9.30Beta
As an example of invalid version syntax:
@@ -2928,7 +2936,7 @@
(error "Invalid version string: '%s'" ver))
(save-match-data
(let ((i 0)
- case-fold-search ; ignore case in matching
+ (case-fold-search t) ; ignore case in matching
lst s al)
(while (and (setq s (string-match "[0-9]+" ver i))
(= s i))
- Re: ispell.el doesn't work any more, (continued)
- Re: ispell.el doesn't work any more, Richard M. Stallman, 2005/09/13
- Re: ispell.el doesn't work any more, Juri Linkov, 2005/09/15
- Re: ispell.el doesn't work any more, Eli Zaretskii, 2005/09/17
- Re: ispell.el doesn't work any more, Juri Linkov, 2005/09/20
- Re: ispell.el doesn't work any more, Luc Teirlinck, 2005/09/20
- Re: ispell.el doesn't work any more, Eli Zaretskii, 2005/09/20
- Re: ispell.el doesn't work any more, Luc Teirlinck, 2005/09/20
- Re: ispell.el doesn't work any more, Eli Zaretskii, 2005/09/20
- Re: ispell.el doesn't work any more, Eli Zaretskii, 2005/09/20
- Re: ispell.el doesn't work any more, Eli Zaretskii, 2005/09/24
- Re: ispell.el doesn't work any more,
Eli Zaretskii <=
- Re: ispell.el doesn't work any more, Eli Zaretskii, 2005/09/17