unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* flyspell-prog-mode, flyspell-mode and different dictionary
@ 2024-07-23 10:45 Sébastien Gendre
  2024-07-23 11:41 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Sébastien Gendre @ 2024-07-23 10:45 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

[-- Attachment #1: Type: text/plain, Size: 843 bytes --]

Hello,

I use a lot flyspell-mode when I write E-mails and Org-mode documents.
And by default, its language is set to french on my system. Which is my
main language.

Recently, I discovered flyspell-prog-mode and wanted to use it in all
programming language editing. But this time, set to english.

In the manual, I didn't found a way to set the spell check language
based on the mode. And there is no flyspell-prog-mode-hook.

Did I miss something ?

Or is the only solution is to attach a lambda function, to prog-mode-hook,
that will call flyspell-prog-mode and ispell-change-dictionary like
this:

        (add-hook 'prog-mode-hook
                  '(lambda ()
                     (flyspell-prog-mode t)
                     (ispell-change-dictionary "english")))



Best regards

-------
Gendre Sébastien

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]

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

end of thread, other threads:[~2024-07-24 13:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-23 10:45 flyspell-prog-mode, flyspell-mode and different dictionary Sébastien Gendre
2024-07-23 11:41 ` Eli Zaretskii
2024-07-23 12:29 ` Joel Reicher
2024-07-23 12:49   ` Sébastien Gendre
2024-07-24  0:39     ` Joel Reicher
2024-07-24 12:56       ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-07-24 13:42         ` Sébastien Gendre
2024-07-23 14:56 ` Stefan Monnier via Users list for the GNU Emacs text editor

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).