From: Emanuel Berg <embe8573@student.uu.se>
To: help-gnu-emacs@gnu.org
Subject: Re: Automatic flyspell
Date: Mon, 23 Feb 2015 00:24:47 +0100 [thread overview]
Message-ID: <87egphttq8.fsf@debian.uxu> (raw)
In-Reply-To: 87ioeuwa5v.fsf@engels.histomat.net
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
next prev parent reply other threads:[~2015-02-22 23:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-20 16:46 Automatic flyspell Haines Brown
2015-02-21 23:38 ` Emanuel Berg
2015-02-22 0:48 ` Emanuel Berg
2015-02-22 9:46 ` Haines Brown
2015-02-22 23:24 ` Emanuel Berg [this message]
2015-02-23 3:46 ` Robert Thorpe
[not found] <mailman.664.1424663182.31049.help-gnu-emacs@gnu.org>
2015-02-23 19:19 ` Emanuel Berg
2015-02-23 21:05 ` Robert Thorpe
[not found] <mailman.708.1424725551.31049.help-gnu-emacs@gnu.org>
2015-02-25 17:01 ` Emanuel Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87egphttq8.fsf@debian.uxu \
--to=embe8573@student.uu.se \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.