[PATCH ispell] Specify encoding to aspell

Jerry James <[email protected]>
Newsgroups gmane.emacs.xemacs.patches
Message-ID <CAHCOHQna+07mWT49iLOOEwVGL6bkMondakmPHNzCnJexBgZgnQ@mail.gmail.com>
PATCH ispell

This is another patch that Fedora has carried for years.  If aspell
version 0.60 or later is in use, specify the text encoding.  Since
version 0.60 was released very close to a decade ago (August 2004), I
think we can safely assume that older versions can be ignored.

diff -r 083f2beaed89 ChangeLog
--- a/ChangeLog Thu May 15 21:04:30 2014 +0200
+++ b/ChangeLog Wed Jun 11 09:50:30 2014 -0600
@@ -1,3 +1,9 @@
+2014-06-11  Jerry James  <[email protected]>
+
+ * ispell.el (ispell-start-process): fix encoding with aspell, and
+ assume that any aspell program is at least the decade-old aspell
+ 0.60.
+
 2014-05-15  Norbert Koch  <[email protected]>

  * Makefile (VERSION): XEmacs package 1.34 released.
diff -r 083f2beaed89 ispell.el
--- a/ispell.el Thu May 15 21:04:30 2014 +0200
+++ b/ispell.el Wed Jun 11 09:50:30 2014 -0600
@@ -2249,6 +2249,11 @@
     (expand-file-name ispell-personal-dictionary)))))
     (setq args (append args ispell-extra-args))

+    ;; If running aspell, fix the encoding; aspell >= 0.60 required
+    (when (string-match "^aspell" (file-name-nondirectory ispell-program-name))
+      (add-to-list
+       'args (concat "--encoding=" (symbol-name (ispell-get-coding-system)))))
+
     (if ispell-async-processp
  (let ((process-connection-type ispell-use-ptys-p))
   (apply 'start-process

-- 
Jerry James
http://www.jamezone.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.