emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/textmodes/flyspell.el,v


From: Glenn Morris
Subject: [Emacs-diffs] Changes to emacs/lisp/textmodes/flyspell.el,v
Date: Sun, 02 Dec 2007 18:17:35 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       07/12/02 18:17:35

Index: flyspell.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/textmodes/flyspell.el,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -b -r1.126 -r1.127
--- flyspell.el 29 Oct 2007 18:32:30 -0000      1.126
+++ flyspell.el 2 Dec 2007 18:17:34 -0000       1.127
@@ -1531,29 +1531,42 @@
     (if flyspell-issue-message-flag (message "Checking region..."))
     (set-buffer curbuf)
     (ispell-check-version)
-    (let ((c (apply 'ispell-call-process-region beg
-                   end
-                   ispell-program-name
-                   nil
-                   buffer
-                   nil
-                   (if ispell-really-aspell "list" "-l")
-                   (let (args)
                      ;; Local dictionary becomes the global dictionary in use.
-                     (if ispell-local-dictionary
-                         (setq ispell-dictionary ispell-local-dictionary))
-                     (setq args (ispell-get-ispell-args))
-                     (if ispell-dictionary ; use specified dictionary
+    (setq ispell-current-dictionary
+         (or ispell-local-dictionary ispell-dictionary))
+    (setq ispell-current-personal-dictionary
+         (or ispell-local-pdict ispell-personal-dictionary))
+    (let ((args (ispell-get-ispell-args))
+         (encoding (ispell-get-coding-system))
+         c)
+      (if (and ispell-current-dictionary  ; use specified dictionary
+              (not (member "-d" args)))  ; only define if not overridden
                          (setq args
-                               (append (list "-d" ispell-dictionary) args)))
-                     (if ispell-personal-dictionary ; use specified pers dict
+               (append (list "-d" ispell-current-dictionary) args)))
+      (if ispell-current-personal-dictionary ; use specified pers dict
                          (setq args
                                (append args
                                        (list "-p"
                                              (expand-file-name
-                                              ispell-personal-dictionary)))))
+                              ispell-current-personal-dictionary)))))
                      (setq args (append args ispell-extra-args))
-                     args))))
+      (if (and ispell-really-aspell
+              ispell-aspell-supports-utf8)
+         (setq args
+               (append args
+                       (list
+                        (concat "--encoding="
+                                (symbol-name
+                                 encoding))))))
+      (let ((process-coding-system-alist (list (cons "\\.*" encoding))))
+       (setq c (apply 'ispell-call-process-region beg
+                      end
+                      ispell-program-name
+                      nil
+                      buffer
+                      nil
+                      (if ispell-really-aspell "list" "-l")
+                      args)))
       (if (eq c 0)
          (progn
            (flyspell-process-localwords buffer)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]