monnier pushed a commit to branch master
in repository elpa.
commit fede34586459c2ae7041bfcc2d4da1bca0754b1e
Author: Teemu Likonen <[email protected]>
Date: Sat Oct 30 12:04:14 2010 +0000
Tarkennetaan Ispell-tulosteen käsittelyä
Nyt jäsennenfunktio wcheck-parse-suggestions-ispell huomioi Ispellin
&-rivin lukumääräkentän: korjausehdotuksista kerätään vain sen osoittama
sanojen määrä.
---
wcheck-mode.el | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/wcheck-mode.el b/wcheck-mode.el
index 933f6e9..adb6e51 100644
--- a/wcheck-mode.el
+++ b/wcheck-mode.el
@@ -1250,9 +1250,10 @@ or nil."
(defun wcheck-parse-suggestions-ispell ()
"Parser for Ispell-compatible programs' output."
(let ((search-spaces-regexp nil))
- (when (re-search-forward "^& [^:]+: \\(.+\\)$" nil t)
- (delete-dups (split-string (match-string-no-properties 1)
- ", " t)))))
+ (when (re-search-forward "^& [^ ]+ \\([0-9]+\\) [0-9]+: \\(.+\\)$" nil t)
+ (let ((count (string-to-number (match-string-no-properties 1)))
+ (words (split-string (match-string-no-properties 2) ", " t)))
+ (delete-dups (nbutlast words (- (length words) count)))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;