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

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

Re: Automatic flyspell


From: Emanuel Berg
Subject: Re: Automatic flyspell
Date: Mon, 23 Feb 2015 00:24:47 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Haines Brown <haines@engels.histomat.net> writes:

> 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?

If you don't want it as the default mode, you
shouldn't, of course. But now I don't understand your
problem anymore (if I ever did).

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

That doesn't seem to carry anything LaTeX specific,
which would look along the lines of:

(setq latex-mode-hook (lambda ()
                         (flyspell-mode 1)
                         ; other modes and options
                         ))

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

OK? I never did Fly in LaTeX, but I did do `ispell-buffer'
and that catches most text areas. Sometimes there can
be problems in certain constructs, e.g.:

    \def\hierarchicalscheduler{A hierarchical
      scheduler is a scheduler that consists of
      several schedulers that are organized
      hierarchically, in a tree structure. ... }

Perhaps because of the braces `ispell-buffer' doesn't
catch mistakes in between, so I use `ispell-region'
for those.

But for common usage, including
\subsection{sphelling}, it works fine.

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

Serious programming is typically not about spelling :)
If you have tons of text in your programs, consider
moving them to textfiles and the like (perhaps XML if
it involves advanced interaction, e.g. a RPG with
dialog trees etc.). For but a few error messages and
the like in a C program you might be helped by
`ispell-comments-and-strings'.

And for Gnus messages: `ispell-message'. None of this
is on the Fly but I thought I'd mention it. Check out
some more work on this:

    http://user.it.uu.se/~embe8573/conf/emacs-init/spell.el

-- 
underground experts united


reply via email to

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