aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReuben Thomas2016-12-04 14:02:48 +0000
committerReuben Thomas2016-12-13 19:43:48 +0000
commit854ed8a6d5e2c85de38a25a7b2158b11d885d1db (patch)
treed3c40d84037cff625cddae5687dec5c36950b3c8
parent3ac94b992c15cd4f45c470d6bd5a978d1bb9565f (diff)
downloademacs-854ed8a6d5e2c85de38a25a7b2158b11d885d1db.tar.gz
emacs-854ed8a6d5e2c85de38a25a7b2158b11d885d1db.zip
Assume Emacs supports [:alpha:] in regexps
* lisp/textmodes/ispell.el (ispell-emacs-alpha-regexp): Remove. (ispell-set-spellchecker-params): Remove tests of ispell-emacs-alpha-regexp.
-rw-r--r--lisp/textmodes/ispell.el55
1 files changed, 22 insertions, 33 deletions
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 5670bcd5ff9..6246eb3bae8 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -666,12 +666,6 @@ here just for backwards compatibility.")
666 "Alist with known matching locales for standard dict names in 666 "Alist with known matching locales for standard dict names in
667 `ispell-dictionary-base-alist'.") 667 `ispell-dictionary-base-alist'.")
668 668
669(defvar ispell-emacs-alpha-regexp
670 (if (string-match "^[[:alpha:]]+$" "abcde")
671 "[[:alpha:]]"
672 nil)
673 "[[:alpha:]] if Emacs supports [:alpha:] regexp, nil
674otherwise (current XEmacs does not support it).")
675 669
676;;; ********************************************************************** 670;;; **********************************************************************
677;;; The following are used by ispell, and should not be changed. 671;;; The following are used by ispell, and should not be changed.
@@ -1244,11 +1238,9 @@ aspell is used along with Emacs).")
1244 (setq ispell-library-directory (ispell-check-version)) 1238 (setq ispell-library-directory (ispell-check-version))
1245 t) 1239 t)
1246 (error nil)) 1240 (error nil))
1247 ispell-encoding8-command 1241 ispell-encoding8-command)
1248 ispell-emacs-alpha-regexp)
1249 ;; auto-detection will only be used if spellchecker is not 1242 ;; auto-detection will only be used if spellchecker is not
1250 ;; ispell, supports a way to set communication to UTF-8 and 1243 ;; ispell and supports a way to set communication to UTF-8.
1251 ;; Emacs flavor supports [:alpha:]
1252 (if ispell-really-aspell 1244 (if ispell-really-aspell
1253 (or ispell-aspell-dictionary-alist 1245 (or ispell-aspell-dictionary-alist
1254 (ispell-find-aspell-dictionaries)) 1246 (ispell-find-aspell-dictionaries))
@@ -1262,9 +1254,8 @@ aspell is used along with Emacs).")
1262 ;; installed dictionaries and add to it elements of the original 1254 ;; installed dictionaries and add to it elements of the original
1263 ;; list that are not present there. Allow distro info. 1255 ;; list that are not present there. Allow distro info.
1264 (let ((found-dicts-alist 1256 (let ((found-dicts-alist
1265 (if (and ispell-encoding8-command 1257 (if ispell-encoding8-command
1266 ispell-emacs-alpha-regexp) 1258 (if ispell-really-aspell
1267 (if ispell-really-aspell
1268 ispell-aspell-dictionary-alist 1259 ispell-aspell-dictionary-alist
1269 (if ispell-really-hunspell 1260 (if ispell-really-hunspell
1270 ispell-hunspell-dictionary-alist)) 1261 ispell-hunspell-dictionary-alist))
@@ -1331,28 +1322,26 @@ aspell is used along with Emacs).")
1331 (push dict all-dicts-alist))) 1322 (push dict all-dicts-alist)))
1332 (setq ispell-dictionary-alist all-dicts-alist)) 1323 (setq ispell-dictionary-alist all-dicts-alist))
1333 1324
1334 ;; If Emacs flavor supports [:alpha:] use it for global dicts. If 1325 ;; If spellchecker supports UTF-8 via command-line option, use it
1335 ;; spellchecker also supports UTF-8 via command-line option use it
1336 ;; in communication. This does not affect definitions in your 1326 ;; in communication. This does not affect definitions in your
1337 ;; init file. 1327 ;; init file.
1338 (if ispell-emacs-alpha-regexp 1328 (let (tmp-dicts-alist)
1339 (let (tmp-dicts-alist) 1329 (dolist (adict ispell-dictionary-alist)
1340 (dolist (adict ispell-dictionary-alist) 1330 (cl-pushnew (if (cadr adict) ;; Do not touch hunspell uninitialized entries
1341 (cl-pushnew (if (cadr adict) ;; Do not touch hunspell uninitialized entries 1331 (list
1342 (list 1332 (nth 0 adict) ; dict name
1343 (nth 0 adict) ; dict name 1333 "[[:alpha:]]" ; casechars
1344 "[[:alpha:]]" ; casechars 1334 "[^[:alpha:]]" ; not-casechars
1345 "[^[:alpha:]]" ; not-casechars 1335 (nth 3 adict) ; otherchars
1346 (nth 3 adict) ; otherchars 1336 (nth 4 adict) ; many-otherchars-p
1347 (nth 4 adict) ; many-otherchars-p 1337 (nth 5 adict) ; ispell-args
1348 (nth 5 adict) ; ispell-args 1338 (nth 6 adict) ; extended-character-mode
1349 (nth 6 adict) ; extended-character-mode 1339 (if ispell-encoding8-command
1350 (if ispell-encoding8-command 1340 'utf-8
1351 'utf-8 1341 (nth 7 adict)))
1352 (nth 7 adict))) 1342 adict)
1353 adict) 1343 tmp-dicts-alist :test #'equal))
1354 tmp-dicts-alist :test #'equal)) 1344 (setq ispell-dictionary-alist tmp-dicts-alist))))
1355 (setq ispell-dictionary-alist tmp-dicts-alist)))))
1356 1345
1357(defun ispell-valid-dictionary-list () 1346(defun ispell-valid-dictionary-list ()
1358 "Return a list of valid dictionaries. 1347 "Return a list of valid dictionaries.