changeset 109019:cc5e488bdbb4

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.
author Agustin martin <agustin.martin@hispalinux.es>
date Thu, 17 Jun 2010 16:44:34 +0200
parents 3fa4756bb7be
children 9087d6113b47
files lisp/ChangeLog lisp/textmodes/ispell.el
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Jun 17 13:02:42 2010 +0200
+++ b/lisp/ChangeLog	Thu Jun 17 16:44:34 2010 +0200
@@ -1,3 +1,8 @@
+2010-06-17  Agustín Martín  <agustin.martin@hispalinux.es>
+
+	* 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  <lekktu@gmail.com>
 
 	* emacs-lisp/package.el (package-menu-mode-map):
--- a/lisp/textmodes/ispell.el	Thu Jun 17 13:02:42 2010 +0200
+++ b/lisp/textmodes/ispell.el	Thu Jun 17 16:44:34 2010 +0200
@@ -982,8 +982,8 @@
   ;; 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