From 26508c03ce7b09ee8a164a450e23811ada41edad Mon Sep 17 00:00:00 2001 From: =?utf8?q?Agust=C3=ADn=20Mart=C3=ADn?= Date: Thu, 17 Jun 2010 16:44:34 +0200 Subject: [PATCH] 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. --- lisp/ChangeLog | 5 +++++ lisp/textmodes/ispell.el | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 374ee905f1..0779035b47 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 1a657b0fdf..4d0cc84235 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 -- 2.39.2