bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20581: 24.5; aspell dictionary de-alt not found


From: Eli Zaretskii
Subject: bug#20581: 24.5; aspell dictionary de-alt not found
Date: Fri, 15 May 2015 16:29:34 +0300

> From: "Felix E. Klee" <address@hidden>
> Date: Fri, 15 May 2015 11:50:55 +0100
> Cc: 20581 <address@hidden>
> 
>     ELISP> (ispell-aspell-find-dictionary "de-alt")
>     nil
> 
> I used `edebug` on `ispell-aspell-find-dictionary` and found that there
> is pattern matching happening that strips the variant `alt` from
> `de-alt`. Then a path is assembled, `fullpath`, which evaluates to:
> "/usr/lib/aspell-0.60/de.dat"
> 
> That `.dat` file doesn’t exist. For `de-alt` it is a mistake to strip
> the variant. The correct path is: "/usr/lib/aspell-0.60/de-alt.dat"

Thanks.  Does the patch below give good results?

diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 43003af..8107f79 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -1077,7 +1077,8 @@ (defun ispell-aspell-find-dictionary (dict-name)
             ;; Try xx.dat first, strip out variant, country code, etc,
             ;; then try xx_YY.dat (without stripping country code).
             (dolist (tmp-regexp (list "^[[:alpha:]]+"
-                                      "^[[:alpha:]_]+"))
+                                      "^[[:alpha:]_]+"
+                                       "^[[:alpha:]]+-\\(alt\\|old\\)"))
               (let ((fullpath
                      (concat tmp-path "/"
                              (and (string-match tmp-regexp dict-name)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]