@@ -61,6 +61,7 @@ interpreter (e.g. GHCi).
61
61
* Interactive Haskell :: How to interact with GHCi (2)
62
62
* Editing Cabal files :: Cabal support
63
63
* Changing REPL target :: Start REPL with selected target (i.e. test,bench,etc.)
64
+ * Using with flyspell-prog-mode :: Spell check comments and strings
64
65
* Concept index :: Index of Haskell Mode concepts
65
66
* Function index :: index of commands
66
67
* Variable index :: Index of options and types
@@ -846,6 +847,41 @@ Answer ``yes'' to restart the session and run your tests, benchmarks, executable
846
847
847
848
TODO/WRITEME
848
849
850
+ @node Using with flyspell-prog-mode
851
+ @chapter Using with @code {flyspell-prog-mode }
852
+
853
+ Strings and comments can be checked for spelling mistakes. There is a
854
+ standard Emacs mode for this purpose, @code {flyspell-prog-mode }, that
855
+ can be enabled in Haskell buffers. Spelling errors are underlined using
856
+ squiggly red lines.
857
+
858
+ @ifhtml
859
+ @image {anim/flyspell-prog-mode }
860
+ @end ifhtml
861
+
862
+ Documentation for @code {flyspell-prog-mode } can be found in
863
+ @xref {Spelling ,,,emacs }. Here we point to a couple of useful
864
+ keybindings:
865
+
866
+ @itemize
867
+ @item
868
+ @kbd {M-$ } - Check and correct spelling of the word at point (@code {ispell-word }).
869
+
870
+ @item
871
+ @kbd {digit } - Replace the word, just this time, with one of the
872
+ displayed near-misses. Each near-miss is listed with a digit; type that
873
+ digit to select it.
874
+
875
+ @item
876
+ @kbd {SPC } - Skip this word—continue to consider it incorrect, but don’t
877
+ change it here.
878
+ @end itemize
879
+
880
+ To enable spell checking of strings and comments add this line to your
881
+ @code {~/.emacs } file:
882
+
883
+ @code {(add-hook 'haskell-mode-hook 'flyspell-prog-mode) }
884
+
849
885
@node Concept index
850
886
@unnumbered Concept index
851
887
0 commit comments