From: Agustín Martín Date: Thu, 17 Jun 2010 14:44:34 +0000 (+0200) Subject: ispell.el (ispell-aspell-find-dictionary): Fix regexp for full xx_YY search. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~52^2~3 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=26508c03ce7b09ee8a164a450e23811ada41edad;p=emacs.git ispell.el (ispell-aspell-find-dictionary): Fix regexp for full xx_YY search. This is needed for languages like Portuguese where there are aspell dicts for pt_BR and pt_PT, not for plain pt. If we strip country part `ispell-aspell-find-dictionary' does not find dicts for portuguese. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 374ee905f12..0779035b47e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-06-17 Agustín Martín + + * ispell.el (ispell-aspell-find-dictionary): Fix regexp for + languages like Portuguese with pt_{BR,PT} and no plain pt. + 2010-06-17 Juanma Barranquero * emacs-lisp/package.el (package-menu-mode-map): diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 1a657b0fdf9..4d0cc842351 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -982,8 +982,8 @@ Assumes that value contains no whitespace." ;; This returns nil if the data file does not exist. ;; Can someone please explain the return value format when the ;; file does exist -- rms? - (let* ((lang ;; Strip out region, variant, etc. - (and (string-match "^[[:alpha:]]+" dict-name) + (let* ((lang ;; Strip out variant, etc. + (and (string-match "^[[:alpha:]_]+" dict-name) (match-string 0 dict-name))) (data-file (concat (or ispell-aspell-data-dir