]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix Hunspell invocation for discovering its dictionaries
authorEli Zaretskii <eliz@gnu.org>
Mon, 11 Feb 2019 16:07:35 +0000 (18:07 +0200)
committerEli Zaretskii <eliz@gnu.org>
Mon, 11 Feb 2019 16:07:35 +0000 (18:07 +0200)
* lisp/textmodes/ispell.el
(ispell-find-hunspell-dictionaries): Invoke Hunspell with the
-a switch, to prevent it from initializing its curses UI.
(Bug#34272)

lisp/textmodes/ispell.el

index 656c9fad932cb2bf465e82c692374891eb16d9eb..237997d41d75aab602de761a38c425ec3782e0bc 100644 (file)
@@ -1114,12 +1114,19 @@ dictionary from that list was found."
                                 null-device
                                 t
                                 nil
+                                 "-D"
+                                 ;; Use -a to prevent Hunspell from
+                                 ;; trying to initialize its
+                                 ;; curses/termcap UI, which causes it
+                                 ;; to crash or fail to start in some
+                                 ;; MS-Windows ports.
+                                 "-a"
                                  ;; Hunspell 1.7.0 (and later?) won't
                                  ;; show LOADED DICTIONARY unless
                                  ;; there's at least one file argument
                                  ;; on the command line.  So we feed
                                  ;; it with the null device.
-                                "-D" null-device)
+                                null-device)
            (buffer-string))
          "[\n\r]+"
          t))