What is Nostr?
zrzz /
npub1ywp…r59j
2024-09-02 21:06:09

zrzz on Nostr: I've been thinking about how to best set the right dictionary for ispell/flyspell in ...

I've been thinking about how to best set the right dictionary for ispell/flyspell in #emacs. I know about [guess-language.el](https://github.com/tmalsburg/guess-language.el ) but I want to keep it simple and predictable. So I am thinking that I could simply set it whenever the input method changes. This is what I've come up with so far, seems to work ok:<code>(add-hook 'input-method-activate-hook<br> (lambda ()<br> (cond ((string= current-input-method "german")<br> (ispell-change-dictionary "de")))))<br><br>(add-hook 'input-method-deactivate-hook<br> (lambda ()<br> (ispell-change-dictionary "en")))<br><br></code>
Author Public Key
npub1ywpu5d5nas33a6x560qxf09fvfdhh7swsd6vzg7dknpyu433sg4qy6r59j