diff lisp/textmodes/ispell.el @ 90228:fa0da9b57058

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-82 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 542-553) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 116-121) - Merge from emacs--cvs-trunk--0 - Update from CVS
author Miles Bader <miles@gnu.org>
date Mon, 19 Sep 2005 10:20:33 +0000
parents 10fe5fadaf89 703495630901
children ee12d75eb214
line wrap: on
line diff
--- a/lisp/textmodes/ispell.el	Sun Sep 11 22:21:01 2005 +0000
+++ b/lisp/textmodes/ispell.el	Mon Sep 19 10:20:33 2005 +0000
@@ -719,6 +719,12 @@
 
 (defvar ispell-really-aspell nil) ; Non-nil if aspell extensions should be used
 
+(defvar ispell-aspell-supports-utf8 nil
+  "Non-nil means to try to automatically find aspell dictionaries.
+This is set to t in ispell-check-version for aspell >= 0.60.
+
+Earlier aspell versions do not consistently support UTF-8.  Handling
+this would require some extra guessing in `ispell-aspell-find-dictionary'.")
 
 
 
@@ -782,7 +788,7 @@
 								 (point))
 				 ", "
 				 ispell-version))
-	    (message result))
+	    (message "%s" result))
 	;; return library directory.
 	(if (re-search-forward "LIBDIR = \\\"\\([^ \t\n]*\\)\\\"" nil t)
 	    (setq result (buffer-substring (match-beginning 1) (match-end 1)))))
@@ -814,9 +820,11 @@
         (goto-char (point-min))
         (let (case-fold-search)
           (setq ispell-really-aspell
-		(and (search-forward-regexp "(but really Aspell \\(.*\\))" nil t)
-		     (if (version< (match-string 1) "0.60")
-			 (error "aspell version 0.60 or greater is required")
+		(and (search-forward-regexp
+		      "(but really Aspell \\(.*\\))" nil t)
+		     (progn
+		       (setq ispell-aspell-supports-utf8
+			     (not (version< (match-string 1) "0.60")))
 		       t)))))
       (kill-buffer (current-buffer)))
     result))
@@ -972,7 +980,8 @@
 	     (condition-case ()
 		 (progn (ispell-check-version) t)
 	       (error nil))
-	     ispell-really-aspell)
+	     ispell-really-aspell
+	     ispell-aspell-supports-utf8)
     (ispell-find-aspell-dictionaries))
   (let ((dicts (append ispell-local-dictionary-alist ispell-dictionary-alist))
 	(dict-list (cons "default" nil))
@@ -2348,7 +2357,7 @@
     (substring output 2))		; return root word
    ((equal 0 (string-match "[\ra-zA-Z]" output))
     (ding)				; error message from ispell!
-    (message (concat "Ispell error: " output))
+    (message "Ispell error: %s" output)
     (sit-for 5)
     nil)
    (t					; need to process &, ?, and #'s