mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-16 10:50:49 -08:00
ispell.el (ispell-encoding8-command): New variable
(ispell-aspell-supports-utf8): Mark as obsoleted by ispell-encoding8-command (ispell-check-version): Set ispell-encoding8-command (ispell-check-spellchecker-params, ispell-start-process): Use ispell-encoding8-command flyspell.el (flyspell-large-region): Use ispell-encoding8-command
This commit is contained in:
parent
ae52547107
commit
57bf8fd484
3 changed files with 41 additions and 24 deletions
|
|
@ -1,3 +1,15 @@
|
||||||
|
2009-01-08 Agustín Martín <agustin.martin@hispalinux.es>
|
||||||
|
|
||||||
|
* textmodes/ispell.el (ispell-encoding8-command): New variable
|
||||||
|
(ispell-aspell-supports-utf8): Mark as obsoleted by
|
||||||
|
ispell-encoding8-command
|
||||||
|
(ispell-check-version): Set ispell-encoding8-command
|
||||||
|
(ispell-check-spellchecker-params, ispell-start-process): Use
|
||||||
|
ispell-encoding8-command
|
||||||
|
|
||||||
|
* textmodes/flyspell.el (flyspell-large-region): Use
|
||||||
|
ispell-encoding8-command
|
||||||
|
|
||||||
2009-01-08 Glenn Morris <rgm@gnu.org>
|
2009-01-08 Glenn Morris <rgm@gnu.org>
|
||||||
|
|
||||||
* calendar/cal-menu.el (cal-menu-scroll-menu): Remove entries that don't
|
* calendar/cal-menu.el (cal-menu-scroll-menu): Remove entries that don't
|
||||||
|
|
|
||||||
|
|
@ -1526,7 +1526,6 @@ The buffer to mark them in is `flyspell-large-region-buffer'."
|
||||||
(or ispell-local-pdict ispell-personal-dictionary))
|
(or ispell-local-pdict ispell-personal-dictionary))
|
||||||
(let ((args (ispell-get-ispell-args))
|
(let ((args (ispell-get-ispell-args))
|
||||||
(encoding (ispell-get-coding-system))
|
(encoding (ispell-get-coding-system))
|
||||||
encoding-command
|
|
||||||
c)
|
c)
|
||||||
(if (and ispell-current-dictionary ; use specified dictionary
|
(if (and ispell-current-dictionary ; use specified dictionary
|
||||||
(not (member "-d" args))) ; only define if not overridden
|
(not (member "-d" args))) ; only define if not overridden
|
||||||
|
|
@ -1542,15 +1541,11 @@ The buffer to mark them in is `flyspell-large-region-buffer'."
|
||||||
|
|
||||||
;; If we are using recent aspell or hunspell, make sure we use the right encoding
|
;; If we are using recent aspell or hunspell, make sure we use the right encoding
|
||||||
;; for communication. ispell or older aspell/hunspell does not support this
|
;; for communication. ispell or older aspell/hunspell does not support this
|
||||||
(if (or (and ispell-really-aspell
|
(if ispell-encoding8-command
|
||||||
ispell-aspell-supports-utf8
|
|
||||||
(setq encoding-command "--encoding="))
|
|
||||||
(and ispell-really-hunspell
|
|
||||||
(setq encoding-command "-i ")))
|
|
||||||
(setq args
|
(setq args
|
||||||
(append args
|
(append args
|
||||||
(list
|
(list
|
||||||
(concat encoding-command
|
(concat ispell-encoding8-command
|
||||||
(symbol-name
|
(symbol-name
|
||||||
encoding))))))
|
encoding))))))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -708,14 +708,25 @@ LANGUAGE.aff file \(e.g., english.aff\).")
|
||||||
|
|
||||||
(defvar ispell-really-aspell nil) ; Non-nil if aspell extensions should be used
|
(defvar ispell-really-aspell nil) ; Non-nil if aspell extensions should be used
|
||||||
(defvar ispell-really-hunspell nil) ; Non-nil if hunspell extensions should be used
|
(defvar ispell-really-hunspell nil) ; Non-nil if hunspell extensions should be used
|
||||||
|
(defvar ispell-encoding8-command nil
|
||||||
|
"Command line option prefix to select UTF-8 if supported, nil otherwise.
|
||||||
|
If UTF-8 if supported by spellchecker and is selectable from the command line
|
||||||
|
this variable will contain \"--encoding=\" for aspell and \"-i \" for hunspell,
|
||||||
|
so UTF-8 or other mime charsets can be selected. That will be set for hunspell
|
||||||
|
>=1.1.6 or aspell >= 0.60 in `ispell-check-version'.
|
||||||
|
|
||||||
(defvar ispell-aspell-supports-utf8 nil
|
For aspell non-nil means to try to automatically find aspell dictionaries.
|
||||||
"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
|
Earlier aspell versions do not consistently support UTF-8. Handling
|
||||||
this would require some extra guessing in `ispell-aspell-find-dictionary'.")
|
this would require some extra guessing in `ispell-aspell-find-dictionary'.")
|
||||||
|
|
||||||
|
(defvar ispell-aspell-supports-utf8 nil
|
||||||
|
"Non nil if aspell has consistent command line UTF-8 support. Obsolete.
|
||||||
|
ispell.el and flyspell.el will use for this purpose the more generic
|
||||||
|
variable `ispell-encoding8-command' for both aspell and hunspell. Is left
|
||||||
|
here just for backwards compatibility.")
|
||||||
|
|
||||||
|
(make-obsolete-variable 'ispell-aspell-supports-utf8
|
||||||
|
'ispell-encoding8-command "23.1")
|
||||||
|
|
||||||
|
|
||||||
;;; **********************************************************************
|
;;; **********************************************************************
|
||||||
|
|
@ -790,7 +801,8 @@ Otherwise returns the library directory name, if that is defined."
|
||||||
;; Make sure these variables are (re-)initialized to the default value
|
;; Make sure these variables are (re-)initialized to the default value
|
||||||
(setq ispell-really-aspell nil
|
(setq ispell-really-aspell nil
|
||||||
ispell-aspell-supports-utf8 nil
|
ispell-aspell-supports-utf8 nil
|
||||||
ispell-really-hunspell nil)
|
ispell-really-hunspell nil
|
||||||
|
ispell-encoding8-command nil)
|
||||||
|
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(or (setq ispell-really-aspell
|
(or (setq ispell-really-aspell
|
||||||
|
|
@ -819,10 +831,13 @@ Otherwise returns the library directory name, if that is defined."
|
||||||
(ispell-really-aspell
|
(ispell-really-aspell
|
||||||
(if (ispell-check-minver aspell-minver ispell-really-aspell)
|
(if (ispell-check-minver aspell-minver ispell-really-aspell)
|
||||||
(if (ispell-check-minver aspell8-minver ispell-really-aspell)
|
(if (ispell-check-minver aspell8-minver ispell-really-aspell)
|
||||||
(setq ispell-aspell-supports-utf8 t))
|
(progn
|
||||||
|
(setq ispell-aspell-supports-utf8 t)
|
||||||
|
(setq ispell-encoding8-command "--encoding=")))
|
||||||
(setq ispell-really-aspell nil)))
|
(setq ispell-really-aspell nil)))
|
||||||
(ispell-really-hunspell
|
(ispell-really-hunspell
|
||||||
(or (ispell-check-minver hunspell8-minver ispell-really-hunspell)
|
(if (ispell-check-minver hunspell8-minver ispell-really-hunspell)
|
||||||
|
(setq ispell-encoding8-command "-i ")
|
||||||
(setq ispell-really-hunspell nil))))))
|
(setq ispell-really-hunspell nil))))))
|
||||||
result))
|
result))
|
||||||
|
|
||||||
|
|
@ -1029,7 +1044,7 @@ aspell is used along with Emacs).")
|
||||||
t)
|
t)
|
||||||
(error nil))
|
(error nil))
|
||||||
ispell-really-aspell
|
ispell-really-aspell
|
||||||
ispell-aspell-supports-utf8
|
ispell-encoding8-command
|
||||||
;; XEmacs does not like [:alpha:] regexps.
|
;; XEmacs does not like [:alpha:] regexps.
|
||||||
(string-match "^[[:alpha:]]+$" "abcde"))
|
(string-match "^[[:alpha:]]+$" "abcde"))
|
||||||
(unless ispell-aspell-dictionary-alist
|
(unless ispell-aspell-dictionary-alist
|
||||||
|
|
@ -1041,7 +1056,7 @@ aspell is used along with Emacs).")
|
||||||
;; of the original list that are not present there. Allow distro info.
|
;; of the original list that are not present there. Allow distro info.
|
||||||
(let ((found-dicts-alist
|
(let ((found-dicts-alist
|
||||||
(if (and ispell-really-aspell
|
(if (and ispell-really-aspell
|
||||||
ispell-aspell-supports-utf8)
|
ispell-encoding8-command)
|
||||||
ispell-aspell-dictionary-alist
|
ispell-aspell-dictionary-alist
|
||||||
nil))
|
nil))
|
||||||
ispell-base-dicts-override-alist ; Override only base-dicts-alist
|
ispell-base-dicts-override-alist ; Override only base-dicts-alist
|
||||||
|
|
@ -2524,7 +2539,6 @@ When asynchronous processes are not supported, `run' is always returned."
|
||||||
"Start the ispell process, with support for no asynchronous processes.
|
"Start the ispell process, with support for no asynchronous processes.
|
||||||
Keeps argument list for future ispell invocations for no async support."
|
Keeps argument list for future ispell invocations for no async support."
|
||||||
(let ((default-directory default-directory)
|
(let ((default-directory default-directory)
|
||||||
encoding-command
|
|
||||||
args)
|
args)
|
||||||
(unless (and (file-directory-p default-directory)
|
(unless (and (file-directory-p default-directory)
|
||||||
(file-readable-p default-directory))
|
(file-readable-p default-directory))
|
||||||
|
|
@ -2548,15 +2562,11 @@ Keeps argument list for future ispell invocations for no async support."
|
||||||
|
|
||||||
;; If we are using recent aspell or hunspell, make sure we use the right encoding
|
;; If we are using recent aspell or hunspell, make sure we use the right encoding
|
||||||
;; for communication. ispell or older aspell/hunspell does not support this
|
;; for communication. ispell or older aspell/hunspell does not support this
|
||||||
(if (or (and ispell-really-aspell
|
(if ispell-encoding8-command
|
||||||
ispell-aspell-supports-utf8
|
|
||||||
(setq encoding-command "--encoding="))
|
|
||||||
(and ispell-really-hunspell
|
|
||||||
(setq encoding-command "-i ")))
|
|
||||||
(setq args
|
(setq args
|
||||||
(append args
|
(append args
|
||||||
(list
|
(list
|
||||||
(concat encoding-command
|
(concat ispell-encoding8-command
|
||||||
(symbol-name (ispell-get-coding-system)))))))
|
(symbol-name (ispell-get-coding-system)))))))
|
||||||
(setq args (append args ispell-extra-args))
|
(setq args (append args ispell-extra-args))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue