Subject: bug#24439: ispell.el; cutom setting `ispell-library-directory'; patch

From: Laimonas Vėbra <[email-masked]>
Date: Wed, 14 Sep 2016 23:02:03 +0300

Hello,

On Windows if one uses cygwin ispell, then one should fix ispell LIBDIR 
(which is not correct absolute path) relative to cygwin root by setting 
`ispell-library-directory'. Or one also might wish to use custom 
location of dictionaries.
Currently ispell.el breaks this possibiliity, because it resets
`ispell-library-directory' to possibly incorrect or unwanted ispell 
LIBDIR on every ispell call. Suggested patch attached.

I'm not sure if it doesn't break something (that's why i'm asking in 
patch comments), but AFAICS it shouldn't.
Could someone familiar with ispell.el overview and comment on this tiny 
patch?
--- ispell.el.orig	2015-04-02 10:23:06.000000000 +0300
+++ ispell.el	2016-09-14 22:36:58.446548500 +0300
@@ -3044,7 +3044,17 @@
 	       ispell-program-name
 	       (or ispell-local-dictionary ispell-dictionary "default"))
       (sit-for 0)
-      (setq ispell-library-directory (ispell-check-version)
+      (setq
+        ;; Why do we need to update `ispell-library-directory' on every 
+        ;; ispell process launch? If we do not change `ispell-program-name', 
+        ;; then `ispell-library-directory' should also not be changed once 
+        ;; it is set/initialized in `ispell-set-spellchecker-params'.
+        ;; Besides, this breaks custom setting `ispell-library-directory' 
+        ;; (e.g. cygwin ispell with LIBDIR relative to cygwin root, that 
+        ;; should be fixed; custom location of dictionaries), because it 
+        ;; resets `ispell-library-directory' to (possibly incorrect, 
+        ;; unwanted) ispell LIBDIR on every ispell call.
+        ;; ispell-library-directory (ispell-check-version) 
 	    ispell-process (ispell-start-process)
 	    ispell-filter nil
 	    ispell-filter-continue nil