[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 d60faf3: Improve detection of speller version in
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-26 d60faf3: Improve detection of speller version in ispell.el |
Date: |
Fri, 22 Dec 2017 04:12:19 -0500 (EST) |
branch: emacs-26
commit d60faf32757ef007c7b5d07a8b248ee4a6f8f83e
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Improve detection of speller version in ispell.el
* lisp/textmodes/ispell.el (ispell-check-version): Accept more
general forms of version numbers for Aspell, Hunspell, and
Enchant, to include various beta and prereleases. (Bug#29801)
---
lisp/textmodes/ispell.el | 30 +++++++++++++++++-------------
1 file changed, 17 insertions(+), 13 deletions(-)
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 6a16962..25f62e3 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -712,10 +712,10 @@ Otherwise returns the library directory name, if that is
defined."
(error "%s exited with %s %s" ispell-program-name
(if (stringp status) "signal" "code") status))
- ;; Get relevant version strings. Only xx.yy.... format works well
+ ;; Get relevant version strings.
(let (case-fold-search)
(setq ispell-program-version
- (and (search-forward-regexp "\\([0-9]+\\.[0-9\\.]+\\)" nil t)
+ (and (search-forward-regexp "\\([0-9]+\\.[0-9.]+\\)" nil t)
(match-string 1)))
;; Make sure these variables are (re-)initialized to the default value
@@ -725,19 +725,23 @@ Otherwise returns the library directory name, if that is
defined."
(goto-char (point-min))
(or (setq ispell-really-aspell
- (and (search-forward-regexp
- "(but really Aspell \\([0-9]+\\.[0-9\\.-]+\\)?)" nil t)
- (match-string 1)))
+ (and
+ (search-forward-regexp
+ "(but really Aspell \\([0-9]+\\.[0-9.]+\\([-._+
]?[a-zA-Z0-9]+\\)?\\)?)"
+ nil t)
+ (match-string 1)))
(setq ispell-really-hunspell
- (and (search-forward-regexp
- "(but really Hunspell \\([0-9]+\\.[0-9\\.-]+\\)?)"
- nil t)
- (match-string 1)))
+ (and
+ (search-forward-regexp
+ "(but really Hunspell \\([0-9]+\\.[0-9.]+\\([-._+
]?[a-zA-Z0-9]+\\)?\\)?)"
+ nil t)
+ (match-string 1)))
(setq ispell-really-enchant
- (and (search-forward-regexp
- "(but really Enchant \\([0-9]+\\.[0-9\\.-]+\\)?)"
- nil t)
- (match-string 1)))))
+ (and
+ (search-forward-regexp
+ "(but really Enchant \\([0-9]+\\.[0-9.]+\\([-._+
]?[a-zA-Z0-9]+\\)?\\)?)"
+ nil t)
+ (match-string 1)))))
(let* ((aspell8-minver "0.60")
(ispell-minver "3.1.12")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-26 d60faf3: Improve detection of speller version in ispell.el,
Eli Zaretskii <=