aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2007-12-02 18:18:19 +0000
committerGlenn Morris2007-12-02 18:18:19 +0000
commita3614e04ba70e16856e26aaacd80effe481638d0 (patch)
tree16f42029d8b5e642b46a4edb5285dcadf7ade456
parentacf7984c5b5afe6d6c2c16d47bb9da9308624221 (diff)
downloademacs-a3614e04ba70e16856e26aaacd80effe481638d0.tar.gz
emacs-a3614e04ba70e16856e26aaacd80effe481638d0.zip
Agustín Martín <agustin.martin at hispalinux.es>
(flyspell-large-region): Explicitly set encoding for aspell process and for communication with it. Only add "-d" option if not already present. Use ispell-current-dictionary and ispell-current-personal-dictionary. General reorganization.
-rw-r--r--lisp/ChangeLog12
-rw-r--r--lisp/textmodes/flyspell.el59
2 files changed, 48 insertions, 23 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 79fcc774ecc..1e038f2a86c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,15 @@
12007-12-02 Agustin Martin <agustin.martin@hispalinux.es>
2
3 * textmodes/flyspell.el (flyspell-large-region): Explicitly set
4 encoding for aspell process and for communication with it.
5 Only add "-d" option if not already present.
6 Use ispell-current-dictionary and ispell-current-personal-dictionary.
7 General reorganization.
8
9 * textmodes/ispell.el (ispell-aspell-find-dictionary): Do not set
10 encoding here.
11 (ispell-start-process): Explicitly set encoding here if using aspell.
12
12007-12-02 Dan Nicolaescu <dann@ics.uci.edu> 132007-12-02 Dan Nicolaescu <dann@ics.uci.edu>
2 14
3 * pcvs.el (cvs-mode-commit, cvs-mode-edit-log): Also pass a diff 15 * pcvs.el (cvs-mode-commit, cvs-mode-edit-log): Also pass a diff
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 73e8ec49045..16265ae42d1 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -1531,29 +1531,42 @@ The buffer to mark them in is `flyspell-large-region-buffer'."
1531 (if flyspell-issue-message-flag (message "Checking region...")) 1531 (if flyspell-issue-message-flag (message "Checking region..."))
1532 (set-buffer curbuf) 1532 (set-buffer curbuf)
1533 (ispell-check-version) 1533 (ispell-check-version)
1534 (let ((c (apply 'ispell-call-process-region beg 1534 ;; Local dictionary becomes the global dictionary in use.
1535 end 1535 (setq ispell-current-dictionary
1536 ispell-program-name 1536 (or ispell-local-dictionary ispell-dictionary))
1537 nil 1537 (setq ispell-current-personal-dictionary
1538 buffer 1538 (or ispell-local-pdict ispell-personal-dictionary))
1539 nil 1539 (let ((args (ispell-get-ispell-args))
1540 (if ispell-really-aspell "list" "-l") 1540 (encoding (ispell-get-coding-system))
1541 (let (args) 1541 c)
1542 ;; Local dictionary becomes the global dictionary in use. 1542 (if (and ispell-current-dictionary ; use specified dictionary
1543 (if ispell-local-dictionary 1543 (not (member "-d" args))) ; only define if not overridden
1544 (setq ispell-dictionary ispell-local-dictionary)) 1544 (setq args
1545 (setq args (ispell-get-ispell-args)) 1545 (append (list "-d" ispell-current-dictionary) args)))
1546 (if ispell-dictionary ; use specified dictionary 1546 (if ispell-current-personal-dictionary ; use specified pers dict
1547 (setq args 1547 (setq args
1548 (append (list "-d" ispell-dictionary) args))) 1548 (append args
1549 (if ispell-personal-dictionary ; use specified pers dict 1549 (list "-p"
1550 (setq args 1550 (expand-file-name
1551 (append args 1551 ispell-current-personal-dictionary)))))
1552 (list "-p" 1552 (setq args (append args ispell-extra-args))
1553 (expand-file-name 1553 (if (and ispell-really-aspell
1554 ispell-personal-dictionary))))) 1554 ispell-aspell-supports-utf8)
1555 (setq args (append args ispell-extra-args)) 1555 (setq args
1556 args)))) 1556 (append args
1557 (list
1558 (concat "--encoding="
1559 (symbol-name
1560 encoding))))))
1561 (let ((process-coding-system-alist (list (cons "\\.*" encoding))))
1562 (setq c (apply 'ispell-call-process-region beg
1563 end
1564 ispell-program-name
1565 nil
1566 buffer
1567 nil
1568 (if ispell-really-aspell "list" "-l")
1569 args)))
1557 (if (eq c 0) 1570 (if (eq c 0)
1558 (progn 1571 (progn
1559 (flyspell-process-localwords buffer) 1572 (flyspell-process-localwords buffer)