Группа :: Редакторы
Пакет: emacs22
Главная Изменения Спек Патчи Загрузить Bugs and FR
Патч: emacs-22.0.50-ispell-aspell_noencode.patch
--- emacs.build/lisp/textmodes/ispell.el 2005-12-12 01:05:57 +0500
+++ emacs.build/lisp/textmodes/ispell.el.aspell 2005-12-12 01:18:17 +0500
@@ -1173,7 +1173,7 @@
(defvar ispell-dictionary nil
"Default dictionary to use if `ispell-local-dictionary' is nil.")
-(defun ispell-decode-string (str)
+(defun ispell-decode-string (str &optional inner)
"Decodes multibyte character strings.
Protects against bogus binding of `enable-multibyte-characters' in XEmacs."
(if (and (or (featurep 'xemacs)
@@ -1181,7 +1181,9 @@
enable-multibyte-characters))
(fboundp 'decode-coding-string)
(ispell-get-coding-system))
- (decode-coding-string str (ispell-get-coding-system))
+ (if inner
+ (decode-coding-string str (ispell-get-coding-system-inner))
+ (decode-coding-string str (ispell-get-coding-system)))
str))
(put 'ispell-unified-chars-table 'char-table-extra-slots 0)
@@ -1213,7 +1215,7 @@
(str (nth n slot)))
(when (and (> (length str) 0)
(not (multibyte-string-p str)))
- (setq str (ispell-decode-string str))
+ (setq str (ispell-decode-string str t))
(if (and (= (aref str 0) ?\[)
(eq (string-match "\\]" str) (1- (length str))))
(setq str
@@ -1243,9 +1245,16 @@
(defun ispell-get-extended-character-mode ()
(nth 6 (or (assoc ispell-current-dictionary ispell-local-dictionary-alist)
(assoc ispell-current-dictionary ispell-dictionary-alist))))
-(defun ispell-get-coding-system ()
+(defun ispell-get-coding-system-inner ()
(nth 7 (or (assoc ispell-current-dictionary ispell-local-dictionary-alist)
(assoc ispell-current-dictionary ispell-dictionary-alist))))
+(defun ispell-get-coding-system ()
+ (let ((inner-coding (ispell-get-coding-system-inner)))
+ (if (and ispell-really-aspell
+ ispell-aspell-supports-utf8
+ (not (eq inner-coding 'utf-8)))
+ (coding-system-get locale-coding-system 'mime-charset)
+ inner-coding)))
(defvar ispell-pdict-modified-p nil