aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2005-09-17 11:35:13 +0000
committerEli Zaretskii2005-09-17 11:35:13 +0000
commit4ca8965ca1fe633c0999253778339a2de8d867fd (patch)
tree9462b94dab0cfebd53be7d02d184ad67176fc60f
parente05e7aa65969a7127ec04de25ac61402e1368465 (diff)
downloademacs-4ca8965ca1fe633c0999253778339a2de8d867fd.tar.gz
emacs-4ca8965ca1fe633c0999253778339a2de8d867fd.zip
(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.
-rw-r--r--lisp/textmodes/ispell.el17
1 files changed, 13 insertions, 4 deletions
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index acd27d69c46..2cfa9c829b6 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -719,6 +719,12 @@ LANGUAGE.aff file \(e.g., english.aff\).")
719 719
720(defvar ispell-really-aspell nil) ; Non-nil if aspell extensions should be used 720(defvar ispell-really-aspell nil) ; Non-nil if aspell extensions should be used
721 721
722(defvar ispell-aspell-supports-utf8 nil
723 "Non-nil means to try to automatically find aspell dictionaries.
724This is set to t in ispell-check-version for aspell >= 0.60.
725
726Earlier aspell versions do not consistently support UTF-8. Handling
727this would require some extra guessing in `ispell-aspell-find-dictionary'.")
722 728
723 729
724 730
@@ -814,9 +820,11 @@ Otherwise returns the library directory name, if that is defined."
814 (goto-char (point-min)) 820 (goto-char (point-min))
815 (let (case-fold-search) 821 (let (case-fold-search)
816 (setq ispell-really-aspell 822 (setq ispell-really-aspell
817 (and (search-forward-regexp "(but really Aspell \\(.*\\))" nil t) 823 (and (search-forward-regexp
818 (if (version< (match-string 1) "0.60") 824 "(but really Aspell \\(.*\\))" nil t)
819 (error "aspell version 0.60 or greater is required") 825 (progn
826 (setq ispell-aspell-supports-utf8
827 (not (version< (match-string 1) "0.60")))
820 t))))) 828 t)))))
821 (kill-buffer (current-buffer))) 829 (kill-buffer (current-buffer)))
822 result)) 830 result))
@@ -972,7 +980,8 @@ The variable `ispell-library-directory' defines the library location."
972 (condition-case () 980 (condition-case ()
973 (progn (ispell-check-version) t) 981 (progn (ispell-check-version) t)
974 (error nil)) 982 (error nil))
975 ispell-really-aspell) 983 ispell-really-aspell
984 ispell-aspell-supports-utf8)
976 (ispell-find-aspell-dictionaries)) 985 (ispell-find-aspell-dictionaries))
977 (let ((dicts (append ispell-local-dictionary-alist ispell-dictionary-alist)) 986 (let ((dicts (append ispell-local-dictionary-alist ispell-dictionary-alist))
978 (dict-list (cons "default" nil)) 987 (dict-list (cons "default" nil))