unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#31341: 26.1; setting ispell-base-dicts-override-alist no longer working
@ 2018-05-02 15:05 Anders Johansson
  2018-05-02 15:25 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Anders Johansson @ 2018-05-02 15:05 UTC (permalink / raw)
  To: 31341


After updating to the 26.1 release candidate the custom 
dictionaries I have added via ispell-base-dicts-override-alist are 
no longer added.


I believe that this bug is due to ispell.el being compiled with 
lexical-binding since 26.1, which means that the value of 
ispell-base-dicts-override-alist set via 
ispell-initialize-spellchecker-hook will no longer be in scope in 
the body of ispell-set-spellchecker-params.
(This is the recommended usage in the docstring of 
ispell-initialize-spellchecker-hook).

I guess some other mechanism would have to be devised when using 
lexical-binding.



In GNU Emacs 26.1 (build 3, x86_64-pc-linux-gnu, GTK+ Version 
3.22.30)
 of 2018-04-29 built on ajjb
Windowing system distributor 'The X.Org Foundation', version 
11.0.11906000
Recent messages:

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib 
 --localstatedir=/var --with-x-toolkit=gtk3 --with-xft 
 --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe 
 -fstack-protector-strong -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2 
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS 
NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB 
TOOLKIT_SCROLL_BARS GTK3 X11 MODULES THREADS LIBSYSTEMD LCMS2
Important settings:
  value of $LC_MONETARY: sv_SE.UTF-8
  value of $LC_NUMERIC: sv_SE.UTF-8
  value of $LC_TIME: sv_SE.UTF-8
  value of $LANG: sv_SE.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#31341: 26.1; setting ispell-base-dicts-override-alist no longer working
  2018-05-02 15:05 bug#31341: 26.1; setting ispell-base-dicts-override-alist no longer working Anders Johansson
@ 2018-05-02 15:25 ` Eli Zaretskii
  2018-05-02 16:39   ` Glenn Morris
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2018-05-02 15:25 UTC (permalink / raw)
  To: Anders Johansson; +Cc: 31341

> From: Anders Johansson <mejlaandersj@gmail.com>
> Date: Wed, 02 May 2018 17:05:10 +0200
> 
> After updating to the 26.1 release candidate the custom 
> dictionaries I have added via ispell-base-dicts-override-alist are 
> no longer added.
> 
> 
> I believe that this bug is due to ispell.el being compiled with 
> lexical-binding since 26.1, which means that the value of 
> ispell-base-dicts-override-alist set via 
> ispell-initialize-spellchecker-hook will no longer be in scope in 
> the body of ispell-set-spellchecker-params.
> (This is the recommended usage in the docstring of 
> ispell-initialize-spellchecker-hook).
> 
> I guess some other mechanism would have to be devised when using 
> lexical-binding.

Does recompiling ispell.el without lexical-binding solve this problem?

Also, can you please prepare a short recipe that can be used to
reproduce the problem with ispell.elc as provided in the tarball?

Thanks.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#31341: 26.1; setting ispell-base-dicts-override-alist no longer working
  2018-05-02 15:25 ` Eli Zaretskii
@ 2018-05-02 16:39   ` Glenn Morris
  2018-05-02 16:46     ` Glenn Morris
  2018-05-02 17:19     ` Eli Zaretskii
  0 siblings, 2 replies; 7+ messages in thread
From: Glenn Morris @ 2018-05-02 16:39 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 31341, Anders Johansson

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.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#31341: 26.1; setting ispell-base-dicts-override-alist no longer working
  2018-05-02 16:39   ` Glenn Morris
@ 2018-05-02 16:46     ` Glenn Morris
  2018-05-02 19:20       ` Anders Johansson
  2018-05-02 17:19     ` Eli Zaretskii
  1 sibling, 1 reply; 7+ messages in thread
From: Glenn Morris @ 2018-05-02 16:46 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 31341, Anders Johansson

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)





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#31341: 26.1; setting ispell-base-dicts-override-alist no longer working
  2018-05-02 16:39   ` Glenn Morris
  2018-05-02 16:46     ` Glenn Morris
@ 2018-05-02 17:19     ` Eli Zaretskii
  1 sibling, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2018-05-02 17:19 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 31341, mejlaandersj

> From: Glenn Morris <rgm@gnu.org>
> Cc: Anders Johansson <mejlaandersj@gmail.com>,  31341@debbugs.gnu.org
> Date: Wed, 02 May 2018 12:39:17 -0400
> 
> 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.

Sure, provided that lexical-binding is indeed the problem.  I just
wanted to be sure that's the only issue.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#31341: 26.1; setting ispell-base-dicts-override-alist no longer working
  2018-05-02 16:46     ` Glenn Morris
@ 2018-05-02 19:20       ` Anders Johansson
  2018-05-04 14:27         ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Anders Johansson @ 2018-05-02 19:20 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 31341


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 <rgm@gnu.org> 
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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#31341: 26.1; setting ispell-base-dicts-override-alist no longer working
  2018-05-02 19:20       ` Anders Johansson
@ 2018-05-04 14:27         ` Eli Zaretskii
  0 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2018-05-04 14:27 UTC (permalink / raw)
  To: Anders Johansson; +Cc: 31341-done

> From: Anders Johansson <mejlaandersj@gmail.com>
> Cc: Eli Zaretskii <eliz@gnu.org>, 31341@debbugs.gnu.org
> 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.

Thanks, I installed a fix in the emacs-26 branch.





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-05-04 14:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-02 15:05 bug#31341: 26.1; setting ispell-base-dicts-override-alist no longer working Anders Johansson
2018-05-02 15:25 ` Eli Zaretskii
2018-05-02 16:39   ` Glenn Morris
2018-05-02 16:46     ` Glenn Morris
2018-05-02 19:20       ` Anders Johansson
2018-05-04 14:27         ` Eli Zaretskii
2018-05-02 17:19     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).