mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-03 02:31:03 -08:00
ispell.el (ispell-set-spellchecker-params): Make dicts use [:alpha:] if
possible. If Emacs flavour supports [:alpha:] regexps, use it for Casechars and Not-Casechars. This currently means use it unless flavour is XEmacs. Fixes: debbugs:11200
This commit is contained in:
parent
4b5afbb0d9
commit
177eca34cb
2 changed files with 32 additions and 3 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
|
2012-04-12 Agustín Martín Domingo <agustin.martin@hispalinux.es>
|
||||||
|
|
||||||
|
* ispell.el (ispell-set-spellchecker-params): Post-process
|
||||||
|
`ispell-dictionary-alist' to use [:alpha:] if possible.
|
||||||
|
|
||||||
2012-04-16 Chong Yidong <cyd@gnu.org>
|
2012-04-16 Chong Yidong <cyd@gnu.org>
|
||||||
|
|
||||||
* image.el (imagemagick--extension-regexp): New variable.
|
* image.el (imagemagick--extension-regexp): New variable.
|
||||||
|
|
|
||||||
|
|
@ -767,6 +767,12 @@ here just for backwards compatibility.")
|
||||||
(make-obsolete-variable 'ispell-aspell-supports-utf8
|
(make-obsolete-variable 'ispell-aspell-supports-utf8
|
||||||
'ispell-encoding8-command "23.1")
|
'ispell-encoding8-command "23.1")
|
||||||
|
|
||||||
|
(defvar ispell-emacs-alpha-regexp
|
||||||
|
(if (string-match "^[[:alpha:]]+$" "abcde")
|
||||||
|
"[[:alpha:]]"
|
||||||
|
nil)
|
||||||
|
"[[:alpha:]] if Emacs supports [:alpha:] regexp, nil
|
||||||
|
otherwise (current XEmacs does not support it).")
|
||||||
|
|
||||||
;;; **********************************************************************
|
;;; **********************************************************************
|
||||||
;;; The following are used by ispell, and should not be changed.
|
;;; The following are used by ispell, and should not be changed.
|
||||||
|
|
@ -1092,8 +1098,7 @@ aspell is used along with Emacs).")
|
||||||
(error nil))
|
(error nil))
|
||||||
ispell-really-aspell
|
ispell-really-aspell
|
||||||
ispell-encoding8-command
|
ispell-encoding8-command
|
||||||
;; XEmacs does not like [:alpha:] regexps.
|
ispell-emacs-alpha-regexp)
|
||||||
(string-match "^[[:alpha:]]+$" "abcde"))
|
|
||||||
(unless ispell-aspell-dictionary-alist
|
(unless ispell-aspell-dictionary-alist
|
||||||
(ispell-find-aspell-dictionaries)))
|
(ispell-find-aspell-dictionaries)))
|
||||||
|
|
||||||
|
|
@ -1117,8 +1122,27 @@ aspell is used along with Emacs).")
|
||||||
ispell-dictionary-base-alist))
|
ispell-dictionary-base-alist))
|
||||||
(unless (assoc (car dict) all-dicts-alist)
|
(unless (assoc (car dict) all-dicts-alist)
|
||||||
(add-to-list 'all-dicts-alist dict)))
|
(add-to-list 'all-dicts-alist dict)))
|
||||||
(setq ispell-dictionary-alist all-dicts-alist))))
|
(setq ispell-dictionary-alist all-dicts-alist))
|
||||||
|
|
||||||
|
;; If Emacs flavor supports [:alpha:] use it for global dicts. If
|
||||||
|
;; spellchecker also supports UTF-8 via command-line option use it
|
||||||
|
;; in communication. This does not affect definitions in ~/.emacs.
|
||||||
|
(if ispell-emacs-alpha-regexp
|
||||||
|
(let (tmp-dicts-alist)
|
||||||
|
(dolist (adict ispell-dictionary-alist)
|
||||||
|
(add-to-list 'tmp-dicts-alist
|
||||||
|
(list
|
||||||
|
(nth 0 adict) ; dict name
|
||||||
|
"[[:alpha:]]" ; casechars
|
||||||
|
"[^[:alpha:]]" ; not-casechars
|
||||||
|
(nth 3 adict) ; otherchars
|
||||||
|
(nth 4 adict) ; many-otherchars-p
|
||||||
|
(nth 5 adict) ; ispell-args
|
||||||
|
(nth 6 adict) ; extended-character-mode
|
||||||
|
(if ispell-encoding8-command
|
||||||
|
'utf-8
|
||||||
|
(nth 7 adict)))))
|
||||||
|
(setq ispell-dictionary-alist tmp-dicts-alist)))))
|
||||||
|
|
||||||
(defun ispell-valid-dictionary-list ()
|
(defun ispell-valid-dictionary-list ()
|
||||||
"Return a list of valid dictionaries.
|
"Return a list of valid dictionaries.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue