Subject: bug#31341: 26.1; setting ispell-base-dicts-override-alist no longer working

From: Anders Johansson <[email-masked]>
Date: Wed, 02 May 2018 21:20:02 +0200

A recipe for testing. Putting the following code in a file 
ispell-test.el and running ‘emacs -Q l ispell-test.el‘ gives a 
positive result for ispell.el byte-compiled without 
lexical-binding and negative result with lexical binding.
It also works to just add (defvar 
ispell-base-dicts-override-alist) in ispell.el.

--------------------
(load-library "ispell")

(add-hook 'ispell-initialize-spellchecker-hook 
#'ispell-extra-dicts-test)

(defun ispell-extra-dicts-test ()
  (setq ispell-base-dicts-override-alist
        '(("en_GB,sv_SE"
           "[[:alpha:]]" "[^[:alpha:]]"
           "[’'´.0-b:-]" t ("-d" "en_GB,sv_SE")
           nil utf-8))))

(ispell-set-spellchecker-params)

(if (assoc "en_GB,sv_SE" ispell-dictionary-alist)
    (message "It worked!")
  (message "it didn’t work"))

--------------------

On Wednesday  2 May 2018 at 18:46, Glenn Morris <[email-masked]> 
wrote:

> Glenn Morris wrote:
>
>> Eli Zaretskii wrote:
>>
>>> Does recompiling ispell.el without lexical-binding solve this 
>>> problem?
>>
>> I think using
>>
>> (defvar ispell-base-dicts-override-alist nil)
>>
>> (to mark the var as dynamic) would be better.
>
> Or rather just
>
> (defvar ispell-base-dicts-override-alist)

-- 
Anders Johansson