help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Automatic flyspell


From: Haines Brown
Subject: Re: Automatic flyspell
Date: Sun, 22 Feb 2015 04:46:52 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Emanuel Berg <address@hidden> writes:

> Haines Brown <address@hidden> writes:
>
>> In exploring how to get flyspell enabled for all
>> text files, I get impression these should work, but
>> despite them I remain in the Fundamental mode with
>> the only minor mode being Fill.
>
> Aha, now I think I understand. Do you want to use
> text-mode for files like README but you end up in
> fundamental-mode?
>
> If so, try this:
>
>     (set-default 'major-mode 'text-mode)

Emanuel, thanks. I actually have Flyspell working in Fundamental mode
with these lines:

  (defun turn-on-flyspell () (flyspell-mode 1))
  (add-hook 'find-file-hooks 'turn-on-flyspell)

For example it is on now as I write, and my present modes are Message
Fly MML Abbrev Fill Narrow. This probably because I started gnus in
emacs with the two lines above in its init file. When I start emacs its
modes are Lisp Interaction Fill. When I then open a text file with it,
the modes change to Fundamental Fly Fill. So it seems that flyspell is
working in Fundamental mode. If I give a test text file an .txt
extension, emacs opens in the Text Fly Fill modes.

I see no difference off hand from when I open that file without the
extension in the Fundamental Fly Fill modes or with it in the Text
mode. This raises a question, why should I set default to Text mode?

All my work is done in LaTeX mode rather than use a word processor (I
used to use WordPerfect under DOS, but have little idea how to use these
GUI things---too complicated for my antiquated brain). However, for
LaTeX emacs uses a different init file with the lines:

  (defun turn-on-flyspell () (flyspell-mode 1))
  (add-hook 'find-file-hooks 'turn-on-flyspell)

When the emacs session I initially mentioned opens a .tex file, it opens
in the LaTeX Fly Fill modes and knows not to mark commands or
environments such as \subsection{} as misspellings.

When I open a .java file I'm in the Java/1 Fly Abbrev Fill modes. When I
open a .c file, I'm in the C/1 Fly Abbrev Fill modes. In these cases
commands are marked as misspellings. If I did any serious programming
I'd have to tailor Flyspell for those modes.

Haines


 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]