# HG changeset patch # User Eli Zaretskii # Date 1126956913 0 # Node ID 9cf0204bd6009cd4c364c640224b60e9f67fe012 # Parent 42e9220a8c608a6cd4ef32a857eb7c1b0feef268 (ispell-aspell-supports-utf8): New variable. (ispell-check-version): Set ispell-aspell-supports-utf8 to t for aspell versions >= 0.60. (ispell-valid-dictionary-list): Call ispell-find-aspell-dictionaries only if ispell-aspell-supports-utf8 is non-nil. diff -r 42e9220a8c60 -r 9cf0204bd600 lisp/textmodes/ispell.el --- a/lisp/textmodes/ispell.el Sat Sep 17 11:27:40 2005 +0000 +++ b/lisp/textmodes/ispell.el Sat Sep 17 11:35:13 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'.") @@ -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))