If you have any comments on this web page or
if you have a contribution or an application that you would like pointed to
by this weg page, please contact the maintainer of the page. |
Flyspell enables on-the-fly spell checking in Emacs by the means of a
minor mode. It is called Flyspell. This facility is hardly
intrusive. It requires no help. Flyspell highlights incorrect words as
soon as they are completed or as soon as the cursor hits a new word.
Flyspell is language independent because you are free to select your own
dictionary.
Flyspell is compatible with TeX editing. That is, Flyspell tries, as
much as possible, to avoid highlighting TeX command. In order to automate the
starting of Flyspell when editing LaTeX source files, one may add the
following expression in his .emacs file:
(add-hook 'LaTeX-mode-hook 'flyspell-mode)
|
Flyspell proposes corrections for miss-spelled words by the means of
pop-up menus. Clicking Mouse-2 on a highlighted word will raise
a menu that proposes corrections. Alternatively you will be able to store
the word in the global dictionary, to add it to the current document
dictionary or to ignore the miss-spelling for the current session.
Flyspell also proposes automatic corrections. With M-\t,
Flyspell replaces current miss-spelled word with a possible correction.
If several corrections are made possible, they are sorted and M-\t
proposes a new correction each time hit. Corrections may be sorted by
alphabetical ordering (the default) or by likeness to the current word
ordering. To enable the likeness criteria, uses:
(setq flyspell-sort-corrections nil)
|
Flyspell considers that a word repeated twice is an error (for instance,
the second word word is highlighted). This feature can be disable with:
(setq flyspell-doublon-as-error-flag nil)
|
In order to use Flyspell proceed as follow:
- download the flyspell.el
and copy it into the directory of the Emacs load path. Note that the Emacs
load path is controlled by the load-path Emacs-lisp variable.
- Declare the flyspell-mode function as
auto-load. For this, add to your .emacs file the following
expression:
(autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t)
|
(autoload 'flyspell-delay-command "flyspell" "Delay on command." t)
(autoload 'tex-mode-flyspell-verify "flyspell" "" t)
At that stage, you are ready to use Flyspell with
M-x flyspell-mode.
- Flyspell supports many other customizations. Most of these
can be configured with M-x customize flyspell. Some other
require edition of the .emacs. For instance:
;; the default flyspell behaviour
(put 'LeTex-mode 'flyspell-mode-predicate 'tex-mode-flyspell-verify)
;; some extra flyspell delayed command
(mapcar 'flyspell-delay-command '(scroll-up1 scroll-down1))
|
Sun Nov 4 17:31:07 CET 2007 (Alban MANCHERON):
*** Use case insensitive comparison when auto-configuring emacs.
Release 1.7m, Wed Aug 23 11:37:05 CEST 2006 (Manuel Serrano):
*** Instead of using the hard-wire "-l" ispell option, Flyspell.el
now checks is Ispell.el defines the variable ISPELL-LISP-COMMAND.
If it does, the value of this variable is used instead of the string
"-l".
Release 1.7l, Mon Jul 24 16:50:06 CEST 2006 (Manuel Serrano):
*** Fix a simple Xemacs bug. The function
FLYSPELL-AFTER-CHANGE-FUNCTION was missing a guard. It has to
check on Xemacs if this-command is a symbol or not!?
Release 1.7j, Tue Dec 13 18:01:36 CET 2005 (Agustin Martin <agustin.martin@hispalinux.es>)
*** Renames flyspell-delete-all-overlays to
flyspell-delete-region-overlays and makes it work on a per region
basis. A new flyspell-delete-all-overlays function is defined to work
in terms of flyspell-delete-region-overlays, and things are set to
use the region function in the right place.
Release 1.7i, Thu Aug 11 09:08:24 CEST 2005 (Piotr Zielinski <piotr.zielinski@cl.cam.ac.uk>):
*** Add some code for preventing spell checking on some commands
(e.g. fill paragraph).
Release 1.7i, Thu Aug 11 09:08:24 CEST 2005 (Agustin Martin <agustin.martin@hispalinux.es>):
*** Improve the handling of localwords on large regions.
Release 1.7i, Thu Apr 14 13:31:02 CEST 2005 (Manuel Serrano):
*** replace (fboundp 'about-xemacs) with
(or (foundp 'about-xemacs) (featurep 'xemacs)).
Release 1.7f, Tue Mar 22 11:50:24 CET 2005 (Peter Heslin):
*** Add advice for flyspell-auto-correct-previous-word.
Release 1.7f, Wed Aug 18 13:41:51 CEST 2004 (Manuel Serrano):
*** Change the meaning of FLYSPELL-LARGE-REGION. From now on,
if FLYSPELL-LARGE-REGION is nil, regions are treated as small.
Release 1.7f, Tue Aug 3 13:54:21 CEST 2004 (Peter Heslin):
*** Improve doublon detection in TeX mode. The fix gets rid
of errors introduced by indexes.
Release 1.7e, Sat Jan 31 10:30:30 CET 2004 (Manuel Serrano):
*** Add the FLYSPELL-PROG-MODE-HOOK to FLYSPELL-PROG-MODE.
Release 1.7d, Fri Aug 15 09:45:40 CEST 2003 (Sam Halliday):
*** backward-delete-char-untabify has been added to the list
of delayed commands.
Release 1.7d, Mon Jul 14 16:36:47 CEST 2003 (Manuel Serrano):
*** Fix a daunting bug with emacs tool-bar. The tool-bar used
to be unexpectedly duplicated when one of the flyspell keymaps
was installed (e.g. mouse keymap). I'm wondering if the
problem is not coming from set-keymap-parent that badly interact
with tool-bars.
Release 1.7c, Sat Mar 1 06:59:25 CET 2003 (Manuel Serrano):
*** Fix yet another bug in FLYSPELL-LARGE-BUFFER. Some incorrect
words where not correctly highlighted, that is, some occurrences
where missed.
Release 1.7c, Mon Feb 10 16:52:33 CET 2003 (Manuel Serrano):
*** Fix a bug in FLYSPELL-BUFFER on TeX mode. During the search
incorrect words, if flyspell.el can't find a word of the misspelled
list, it simply ignores that word. It uses to abort the whole search!
Release 1.7b, Wed Jan 22 10:54:52 CET 2003 (Manuel Serrano):
*** In order to fix a bug in the doublon detection, the call to
the function SEARCH-WORD-{BACKWARD,FORWARD} have been replaced with
calls to two new functions FLYSPELL-SEARCH-WORD-{BACKWARD,FORWARD}.
These functions search a sequence of characters (not a word). When
such a pattern is found, they then check that FLYSPELL-GET-WORD
returns the search worded. To some extent, this fix is very similar
to the one about FLYSPELL-REGION.
Release 1.7b, Thu Jan 16 09:54:16 CET 2003 (Manuel Serrano):
*** Fix a bug in the new version of FLYSPELL-GET-WORD (I got rid
of the variable FLYSPELL-CHECK-ONLY).
*** Fix two bugs about FLYSPELL-GET-WORD, the value returned by
this function were not correctly tested against the empty list.
Release 1.7a, Mon Jan 6 11:33:50 CET 2003 (Michael Shields):
*** flyspell.el (mail-mode-flyspell-verify): More robust handling
of `mail-header-separator'. More efficient signature detection.
Allow for regexp metacharacters in message-header-separator.
Release 1.7a, Tue Dec 24 09:57:54 CET 2002 (Manuel Serrano):
*** Replace the function FLYSPELL-GET-WORD with the function
ISPELL-GET-WORD of ispell.el revision 3.4. It is supposed to
check the German problem. Unfortunately, I'm currently unable to
test because I have no access to the internet and I don't have
German dictionary.
Release 1.7a, Mon Dec 23 17:58:28 CET 2002 (Manuel Serrano):
*** Fix the 1.6j flyspell-buffer procedure.
*** Fix a bug that was responsible for incorrect highlighting of
words made of exactly one non-ascii (iso latin for instance)
character.
Release 1.6j, Fri Sep 20 08:52:00 CEST 2002 (Pasi Ryhanen, Manuel Serrano):
*** The fix of 1.6i was actually incorrect. It has thus been stripped
off. The new fix iterate over a search word until an actual match
is found.
Release 1.6i, Thu Sep 19 10:23:12 CEST 2002 (Pasi Ryhanen, Manuel Serrano):
*** Improves the performance of flyspell-buffer. The spell checking
of the whole buffer is now much faster (many thanks to Pasi).
*** Fix a bug in buffer checking. The search for incorrect words
was incorrect because flyspell.el was not searching "words" but
"strings". The consequence was that if the incorrect word appeared
fist, as a prefix of a correct word, it was not highlighted at the
location it was misspelled.
Release 1.6i, Tue Aug 27 17:47:22 CEST 2002 (Manuel Serrano):
*** Changed key binding C-\ to C-;. Don't even consider asking me
to change it once more :-)
Release 1.6i, Mon Aug 5 15:40:53 CEST 2002 (Manuel Serrano):
*** Changed key binding C-/ to C-\ because Xemacs is already binding
C-/
Release 1.6i, Mon Jul 22 09:13:59 CEST 2002 (Manuel Serrano):
*** Addition of a new customization FLYSPELL-USE-META-TAB that tells
flyspell.el to bind or not to bind META-TAB key for automatic
correction.
Release 1.6i, Wed Jul 3 16:30:01 CEST 2002 (Manuel Serrano):
*** Fix a weird bug in FLYSPELL-HIGHLIGHT-INCORRECT-REGION that yield
to incorrect highlighted word. The fix had consisted in unhighlighting
all the word inside a region to be highlighted.
Release 1.6i, Sat Jun 15 16:37:13 CEST 2002 (Manuel Serrano):
*** Reported various typo fix in the documentation.
*** Change the default setting so that now, abbrev are not used unless
the user customization specifies so.
Release 1.6i, Mon Apr 22 12:18:41 CEST 2002 (Raymond Scholz):
*** Fix cited text recognition.
Release 1.6h (Manuel Serrano):
*** Minor comments modifications.
*** Mode line minor mode customization.
*** Get ride of MAKE-LOCAL-HOOK for POST-COMMAND-HOOK and
PRE-COMMAND-HOOK when flyspell.el is running under Emacs (not XEmacs).
Release 1.6g (Manuel Serrano):
*** Fix some overlay problem with GNU-Emacs.
Release 1.6f (Manuel Serrano):
*** As provided by provided by Mario Lang, flyspell can now display
delimiters around an incorrect word.
*** Emacs Mouse binding is now down-mouse-2 instead of mouse-2.
*** Fix minor compatibility bugs.
Release 1.6e (Manuel Serrano):
*** Fix a error in the emacs binding.
Release 1.6d (Manuel Serrano):
*** Fix a problem with mouse-2 and GNU-Emacs.
*** The keyboard bindings have changed. These are:
[button2]: flyspell-correct-word
[M-\t]: flyspell-auto-correct-word
[C-.]: flyspell-auto-correct-word
[C-/]: flyspell-auto-correct-previous-word
[C-,]: flyspell-goto-next-error
Release 1.6c (Manuel Serrano):
*** Default dictionary is not american anymore.
*** Small bug in (La)TeX mode fixed. Duplicate latex commands
are no longer highlighted.
*** Get rid of flyspell delay when executing keyboard macro.
*** As suggested by Colin Marquardt the variable
FLYSPELL-ISSUE-MESSAGE-FLAG enables/disables all flyspell
messages.
Release 1.6b (Manuel Serrano):
*** Kahlil Hodgson fixes another bug concerning the interaction
between mouse-drag and flyspell.
*** Khalil Hodgson also fixes a bug in flyspell popup menu.
Release 1.6a (Manuel Serrano):
*** Milan Zamazal fixed a bug on abbreviation (when abbrev
table was nil).
*** Provided by Kahlil Hodgson the new function
FLYSPELL-AUTO-CORRECT-PREVIOUS-HOOK corrects the previously
mis spelled word.
*** As suggested by Tak Ota, word insertion (which occurs on
word correction) is controled by a new user configurable
global variable: flyspell-insertion-function.
*** Programming faces that should disable flyspell verification
are now controled by the global variable
FLYSPELL-PROG-TEXT-FACES (as suggested by Stefan Monnier).
*** Workaround by Albert L. Ting about flyspell vs vm (see
FLYSPELL-ACCEPT-BUFFER-LOCAL-DEFS).
*** GNU-Emacs binding mouse-2 turned into down-mouse-2 for
compatibility with mouse-drag.el (thanks to Kahlil Hogson).
*** Patch by Danilov Nikita that changes regexp produced by
(FLYSPELL-GET-WORD) when ISPELL-OTHERCHARS is empty.
*** Fix a bug that occurred on space insertion in the middle of
an incorrect word (when that words split yield to another
mispelled word in the left hand side).
Release 1.5d (Manuel Serrano):
*** FLYSPELL-GOTO-NEXT-ERROR (by default bound to [C-x ,] goto
to the next displayed error. FLYSPELL-GOTO-NEXT-ERROR is
designed to be used after an invokation of FLYSPELL-BUFFER.
Release 1.5c (Manuel Serrano):
*** FLYSPELL-PROG-MODE is a tuned FLYSPELL mode that only
opeartes in program comments. To enter that mode:
ESC-X: flyspell-prog-mode
This idea and this implementation are due to Stefan
Monnier. Let him be thanked.
*** Fix a local-map problem when cursor hits an incorrect word.
(thanks to Stefan Monnier).
*** Custom configuration FLYSPELL-USE-GLOBAL-ABBREV-TABLE-P
enables flyspell to use global or local abbrev table for
automatic correction. This has been suggested by S. Dayton.
*** Incorrect hooks now have a third argument that is doublon
for a doubling error, a position or a list of replacement
as proposed by ispell. In addition, if the result of an
incorrect hook is t, then the word is not highlighted.
Two examplars functions of automatic replacement are
proposed. To use them, add these expressions in your
.emacs file:
(custom-add-option
'flyspell-incorrect-hook
'flyspell-maybe-correct-transposition)
(custom-add-option
'flyspell-incorrect-hook
'flyspell-maybe-correct-doubling)
or
(add-hook 'flyspell-mode-hook
'(lambda ()
(add-hook
'flyspell-incorrect-hook
'flyspell-maybe-correct-transposition)
(add-hook
'flyspell-incorrect-hook
'flyspell-maybe-correct-doubling)))
Release 1.5b (Manuel Serrano):
*** Fix a bug in flyspell-region (thanks to John Fremlin).
*** Fix a bug in word extra charactere (non letters) handling
(thanks to Oleg S. Tihonov).
*** Fix a bug in automatic correction (thanks to Hubert Canon).
Release 1.5a (Manuel Serrano):
*** Speed improvement.
*** I have removed global-flyspell-mode. I will add it back
when emacs will decently support for that feature. In the
mean time, no more hackery.
*** Adding support for abbrev (thanks to Soren Dayton).
Release 1.4j (Manuel Serrano):
*** Fix a bug in the pre-word hook. When a word separator was
entered when the current point was on the beginning of the
next word, the previous word was not checked.
*** Reported a fix from ispell.el in the get-word function
(here called FLYSPELL-GET-WORD). Thanks to Milan Zamazal
for the report.
*** Improved TeX regular expression in order to avoid checking
TeX commands (thanks to Rune Kleveland).
*** Removed the useless ispell `-m' when checking a region
(thanks again to Rune Kleveland).
*** Changed the initial dictionary setting (thanks to Gerd
Boerrigter).
*** Fix a bug in flyspell-unhighlight-at (thanks to Tudor
Hulubei).
Release 1.4i (Manuel Serrano):
*** Improved for efficiency. In particular I have
re-implemented the flyspell-region function.
*** Thanks to Yaron Minsky a bug about the flyspell
initialization has been fixed.
*** Introduction of deplacement commands (for efficiency).
*** Fix a bug in overlay settings (thanks to Felix Lee).
Release 1.4h (Manuel Serrano):
*** Fix some ###autoload cookies.
*** YATCI: yet another TeX command improvement :-(
(many thanks to Didier Remy who actually implements it)
*** Flyspell is now able not to check words inside TeX-math
environement. For that you have to set the custom
flyspell-check-tex-math-command to nil and to download the
texmathp package that you may find at:
http://strw.leidenuniv.nl/~dominik/Tools
*** Fix cursor position movement when using mouse-2 to fix a
word. The cursor position is not correctly adjusted
according to buffer widening/shrinking.
*** Fix a bug FLYSPELL-AUTO-CORRECT-WORD that could be confused
because of some none buffer local variables.
*** FLYSPELL-AUTO-CORRECT-WORD now display in the mini buffer
a replacement list.
Release 1.4g (Manuel Serrano):
*** fix an annoying feature. When the Emacs cursor is above an
incoorect word and that mouse-2 is used to fix that word,
the cursor is moved to the beginning of the fixed word. The
cursor shouldn't move in that situation.
Release 1.4f (Manuel Serrano):
*** Fix a bug in the ADD-MINOR-MODE expression, a quote was
missing (thanks to Greg Klanderman).
*** Addition of the TeX mode predicate (thanks to
Bruce Ravel).
*** Addition of an ###autoload before flyspell-mode-map.
Release 1.4e (Manuel Serrano):
*** Bug fix in auto-correct. The bug used to occure when no
more replacement were available and when the user kept
asking for replacement.
Release 1.4d (Manuel Serrano):
*** Bug fix in flyspell-check-changed-word-p.
Add Norsk dictionary in the list of dictionaries that
consider dash as delimiter.
Adding `To' not to be checked in mail-mode-flyspell-verify.
The binding for auto-correction is now `C-,' because other
modes were already making use of `ESC-TAB'.
When sorting corrections, the mis-spelled word is presented
last.
*** Much better management of TeX commands. Most TeX command parsing
is now processed by ispell instead of Flyspell. This makes Flyspell
to be much less confused with TeX commands as it used to be. In
consequence less TeX commands are hilighted.
Addition of the pre-pre remembering and forgetting. This machinery
helps flyspell to check much few words (twice least). Thus Flyspell
is much more faster than it used to be.
Addition of the
FLYSPELL-DICTIONARIES-THAT-CONSIDER-DASH-AS-WORD-DELIMITER
defcustom, as suggested by Roland Rosenfeld.
FLYSPELL-MODE-LINE-STRING added by SL Baur <steve@xemacs.org>.
Addition of GLOBAL-FLYSPELL-MODE for automatically running
Flyspell in many buffers.
Flyspell now uses AFTER-CHANGE-FUNCTIONS, to correctly
checks all word concern by a command (such as the
TRANSPOSE-CHARS command).
*** The Flyspell version uses only one ispell process, shared by all
buffers running Flyspell. The variable FLYSPELL-MULTI-LANGUAGE-P
has been turn useless since that improvement. For the same reason,
KILL-BUFFER-HOOK is became useless too.
*** FONT-LOCK is not needed anymore thus the top level expression
(require 'font-lock) has been removed (thanks to Simon Marshall).
Addition of the `adjacent' word for the
FLYSPELL-MARK-DUPLICATIONS-FLAG user variable.
1: This file is part of GNU Emacs.
2:
3: GNU Emacs is free software; you can redistribute it and/or modify
4: it under the terms of the GNU General Public License as published by
5: the Free Software Foundation; either version 2, or (at your option)
6: any later version.
7:
8: GNU Emacs is distributed in the hope that it will be useful,
9: but WITHOUT ANY WARRANTY; without even the implied warranty of
10: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11: GNU General Public License for more details.
12:
13: You should have received a copy of the GNU General Public License
14: along with GNU Emacs; see the file COPYING. If not, write to the
15: Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16: Boston, MA 02111-1307, USA.
|