1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524
|
@c =============================================================
@c = $B85(B $BK](B $BLu(B: $BNkLZ1Y;R!wDEED=NBg3X(B
@c = $B2CI.=$@5(B: $BBgLZFXM:!wBgDM(B.$BC^GHBg3X(B = 1998/11/25
@c = 20.4$B2~D{(B: $BBgLZFXM:!wBgDM(B.$BC^GHBg3X(B = 1999/09/12
@c =============================================================
@c This is part of the Emacs manual.
@c Copyright (C) 1985, 86, 87, 93, 94, 95, 1997 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Fixit, Files, Search, Top
@c @chapter Commands for Fixing Typos
@c @cindex typos, fixing
@c @cindex mistakes, correcting
@chapter $BBG$A$^$A$,$$D{@5MQ%3%^%s%I(B
@cindex $B%?%$%]!JBG$A$^$A$,$$!K!"D{@5(B
@cindex $B$^$A$,$$!"D{@5(B
@c In this chapter we describe the commands that are especially useful for
@c the times when you catch a mistake in your text just after you have made
@c it, or change your mind while composing text on the fly.
$BK\>O$G$O!"F~NOD>8e$K%F%-%9%H$N$^$A$,$$$K5$$E$$$?$H$-!"(B
$B$"$k$$$O!"%F%-%9%H$r:n@.Cf$K5$$,JQ$o$C$?$H$-$K(B
$BFC$KJXMx$J%3%^%s%I$r@bL@$7$^$9!#(B
@c The most fundamental command for correcting erroneous editing is the
@c undo command, @kbd{C-x u} or @kbd{C-_}. This command undoes a single
@c command (usually), a part of a command (in the case of
@c @code{query-replace}), or several consecutive self-inserting characters.
@c Consecutive repetitions of @kbd{C-_} or @kbd{C-x u} undo earlier and
@c earlier changes, back to the limit of the undo information available.
@c @xref{Undo}, for for more information.
$B$^$A$,$C$?JT=8$rD{@5$9$k$b$C$H$b4pK\E*$J%3%^%s%I$O!"%"%s%I%%%3%^%s%I!"(B
@kbd{C-x u}$B$d(B@kbd{C-_}$B$G$9!#(B
$B$3$N%3%^%s%I$O!"!JDL>o!K(B1$B$D$N%3%^%s%I!"(B
$B%3%^%s%I$N0lItJ,!J(B@code{query-replace}$B$N>l9g!K!"(B
$B$$$/$D$+$NO"B3$7$?<+8JA^F~J8;z$r%"%s%I%%$7$^$9!#(B
@kbd{C-_}$B$d(B@kbd{C-x u}$B$rO"B3$7$F7+$jJV$9$H!"(B
$B%"%s%I%%>pJs$,$"$k8B$j!"<!!9$H0JA0$NJQ99$r%"%s%I%%$7$^$9!#(B
$B$h$j>\$7$/$O!"(B@xref{Undo}$B!#(B
@menu
* Kill Errors:: Commands to kill a batch of recently entered text.
* Transpose:: Exchanging two characters, words, lines, lists...
* Fixing Case:: Correcting case of last word entered.
* Spelling:: Apply spelling checker to a word, or a whole file.
@end menu
@node Kill Errors
@c @section Killing Your Mistakes
@section $B8m$j$ND{@5(B
@table @kbd
@item @key{DEL}
@c Delete last character (@code{delete-backward-char}).
$B%]%$%s%H$ND>A0$NJ8;z$r:o=|$9$k!J(B@code{delete-backward-char}$B!K!#(B
@item M-@key{DEL}
@c Kill last word (@code{backward-kill-word}).
$B%]%$%s%H$ND>A0$NC18l$r%-%k$9$k!J(B@code{backward-kill-word}$B!K!#(B
@item C-x @key{DEL}
@c Kill to beginning of sentence (@code{backward-kill-sentence}).
$B%]%$%s%H$+$iJ8$N@hF,$^$G$r%-%k$9$k!J(B@code{backward-kill-sentence}$B!K!#(B
@end table
@c The @key{DEL} character (@code{delete-backward-char}) is the most
@c important correction command. It deletes the character before point.
@c When @key{DEL} follows a self-inserting character command, you can think
@c of it as canceling that command. However, avoid the mistake of thinking
@c of @key{DEL} as a general way to cancel a command!
@key{DEL}$BJ8;z!J(B@code{delete-backward-char}$B!K$O(B
$B$b$C$H$b=EMW$JD{@5%3%^%s%I$G$9!#(B
$B%]%$%s%H$ND>A0$K$"$kJ8;z$r:o=|$7$^$9!#(B
$B<+8JA^F~J8;z$N%3%^%s%I$KB3$1$F(B@key{DEL}$B$rBG$D$H!"(B
$B$=$N%3%^%s%I$r<h$j>C$9$H9M$($k$3$H$,$G$-$^$9!#(B
$B$7$+$7!"%3%^%s%I$r<h$j>C$90lHLE*$JJ}K!$O(B@key{DEL}$B$G$"$k$J$I$H(B
$B8m2r$7$J$$$G$/$@$5$$!#(B
@c When your mistake is longer than a couple of characters, it might be
@c more convenient to use @kbd{M-@key{DEL}} or @kbd{C-x @key{DEL}}.
@c @kbd{M-@key{DEL}} kills back to the start of the last word, and @kbd{C-x
@c @key{DEL}} kills back to the start of the last sentence. @kbd{C-x
@c @key{DEL}} is particularly useful when you change your mind about the
@c phrasing of the text you are writing. @kbd{M-@key{DEL}} and @kbd{C-x
@c @key{DEL}} save the killed text for @kbd{C-y} and @kbd{M-y} to
@c retrieve. @xref{Yanking}.@refill
$B$^$A$,$$$,?tJ8;z$h$j$bD9$$$H$-$K$O!"(B
@kbd{M-@key{DEL}}$B$d(B@kbd{C-x @key{DEL}}$B$r;H$&$[$&$,JXMx$G$7$g$&!#(B
@kbd{M-@key{DEL}}$B$OD>A0$NC18l$N@hF,$^$G$r%-%k$7!"(B
@kbd{C-x @key{DEL}}$B$OD>A0$NJ8$N@hF,$^$G$r%-%k$7$^$9!#(B
$BJ8$r=q$$$F$$$kESCf$G5$$,JQ$o$C$?$H$-$K$O!"(B
@kbd{C-x @key{DEL}}$B$,FC$KJXMx$G$9!#(B
@kbd{M-@key{DEL}}$B$H(B@kbd{C-x @key{DEL}}$B$O!"(B
$B%-%k$7$?%F%-%9%H$r(B@kbd{C-y}$B$d(B@kbd{M-y}$B$GLa$;$k$h$&$KJ]B8$7$^$9!#(B
@xref{Yanking}$B!#(B
@c @kbd{M-@key{DEL}} is often useful even when you have typed only a few
@c characters wrong, if you know you are confused in your typing and aren't
@c sure exactly what you typed. At such a time, you cannot correct with
@c @key{DEL} except by looking at the screen to see what you did. Often it
@c requires less thought to kill the whole word and start again.
$B2?$rBG$H$&$H$7$F$$$k$N$+:.Mp$7$?$j$o$+$i$J$/$J$C$?$j$7$?$H$-$K$O!"(B
$BBG$A$^$A$,$$$,$?$H$(?tJ8;z$G$"$C$F$b(B@kbd{M-@key{DEL}}$B$O$H$F$bJXMx$G$9!#(B
$B$3$N$h$&$J>l9g!"2hLL$r8+$J$,$i$G$J$$$H(B@key{DEL}$B$G$OD{@5$G$-$^$;$s!#(B
@kbd{M-@key{DEL}}$B$J$i$P!"$[$H$s$I2?$b9M$($:$KC18lA4BN$r%-%k$7$F!"(B
$BF~NO$r:F3+$G$-$^$9!#(B
@node Transpose
@c @section Transposing Text
@section $B%F%-%9%H$NF~$lBX$((B
@table @kbd
@item C-t
@c Transpose two characters (@code{transpose-chars}).
2$B$D$NJ8;z$rF~$lBX$($k!J(B@code{transpose-chars}$B!K!#(B
@item M-t
@c Transpose two words (@code{transpose-words}).
2$B$D$NC18l$rF~$lBX$($k!J(B@code{transpose-words}$B!K!#(B
@item C-M-t
@c Transpose two balanced expressions (@code{transpose-sexps}).
$BD`$j9g$C$F$$$k(B2$B$D$N<0$rF~$lBX$($k!J(B@code{transpose-sexps}$B!K!#(B
@item C-x C-t
@c Transpose two lines (@code{transpose-lines}).
2$B$D$N9T$rF~$lBX$($k!J(B@code{transpose-lines}$B!K!#(B
@end table
@kindex C-t
@findex transpose-chars
@c The common error of transposing two characters can be fixed, when they
@c are adjacent, with the @kbd{C-t} command (@code{transpose-chars}). Normally,
@c @kbd{C-t} transposes the two characters on either side of point. When
@c given at the end of a line, rather than transposing the last character of
@c the line with the newline, which would be useless, @kbd{C-t} transposes the
@c last two characters on the line. So, if you catch your transposition error
@c right away, you can fix it with just a @kbd{C-t}. If you don't catch it so
@c fast, you must move the cursor back to between the two transposed
@c characters. If you transposed a space with the last character of the word
@c before it, the word motion commands are a good way of getting there.
@c Otherwise, a reverse search (@kbd{C-r}) is often the best way.
@c @xref{Search}.
2$B$D$NJ8;z$rF~$lBX$($F$7$^$&$H$$$&$h$/$"$k$^$A$,$$$O!"(B
$B$=$l$i$,NY@\$7$F$$$k$J$i$P!"(B
@kbd{C-t}$B%3%^%s%I!J(B@code{transpose-chars}$B!K$GD>$;$^$9!#(B
$BDL>o!"(B@kbd{C-t}$B$O!"%]%$%s%H$NN>B&$K$"$kJ8;z$rF~$lBX$($^$9!#(B
$B9TKv$G$O!"9TKv$NJ8;z$H2~9TJ8;z$rF~$lBX$($k$H$$$&Lr$KN)$?$J$$(B
$B$3$H$G$O$J$/$F!"(B@kbd{C-t}$B$O$=$N9T$N:G8e$N(B2$BJ8;z$rF~$lBX$($^$9!#(B
$B$h$C$F!"F~$lBX$($^$A$,$$$K$9$0$K5$$E$$$?$J$i!"(B
@kbd{C-t}$B$@$1$GD{@5$G$-$^$9!#(B
$B$^$A$,$$$K$9$0$K5$$E$+$J$+$C$?$H$-$K$O!"(B
2$B$D$NF~$lBX$o$C$F$$$kJ8;z$N$"$$$@$K%+!<%=%k$r0\F0$9$kI,MW$,$"$j$^$9!#(B
$B6uGr$H$=$N$^$($NC18l$N:G8e$NJ8;z$H$rF~$lBX$($F$7$^$C$?$H$-$K$O!"(B
$BC18l0\F0%3%^%s%I$G$=$N>l=j$XLa$k$N$,$h$$$G$7$g$&!#(B
$B$=$l0J30$N>l9g$K$O!"8e8~$-C5:w!J(B@kbd{C-r}$B!K$,:GNI$G$"$k$3$H$,$^$^$"$j$^$9!#(B
@xref{Search}$B!#(B
@kindex C-x C-t
@findex transpose-lines
@kindex M-t
@findex transpose-words
@kindex C-M-t
@findex transpose-sexps
@c @kbd{M-t} (@code{transpose-words}) transposes the word before point
@c with the word after point. It moves point forward over a word, dragging
@c the word preceding or containing point forward as well. The punctuation
@c characters between the words do not move. For example, @w{@samp{FOO, BAR}}
@c transposes into @w{@samp{BAR, FOO}} rather than @samp{@w{BAR FOO,}}.
@kbd{M-t}$B!J(B@code{transpose-words}$B!K$O!"(B
$B%]%$%s%H$ND>A0$NC18l$H%]%$%s%H$ND>8e$NC18l$rF~$lBX$($^$9!#(B
$B%]%$%s%H$OC18l$r(B1$B$DA08~$-$K2#CG$7!"(B
$B%]%$%s%H$ND>A0$NC18l$+%]%$%s%H$r4^$`C18l$rA08~$-$K0z$-$:$C$F$$$-$^$9!#(B
$BC18l$N$"$$$@$K$"$k6gFIE@J8;z$OF0$-$^$;$s!#(B
$B$?$H$($P!"(B@w{@samp{FOO, BAR}}$B$O(B@samp{@w{BAR FOO,}}$B$G$O$J$/$F!"(B
@w{@samp{BAR, FOO}}$B$HF~$lBX$o$j$^$9!#(B
@c @kbd{C-M-t} (@code{transpose-sexps}) is a similar command for transposing
@c two expressions (@pxref{Lists}), and @kbd{C-x C-t} (@code{transpose-lines})
@c exchanges lines. They work like @kbd{M-t} except in determining the
@c division of the text into syntactic units.
@kbd{C-M-t}$B!J(B@code{transpose-sexps}$B!K$O!"(B2$B$D$N<0!J(B@pxref{Lists}$B!K$r(B
$BF~$lBX$($k%3%^%s%I$G$9!#(B
$B$^$?!"(B@kbd{C-x C-t}$B!J(B@code{transpose-lines}$B!K$O!"9T$rF~$lBX$($^$9!#(B
$B$3$l$i$N%3%^%s%I$O(B@kbd{M-t}$B$K;w$?F0:n$r$7$^$9$,!"(B
$B%F%-%9%H$r9=J8C10L$KJ,$1$kE@$,0[$J$j$^$9!#(B
@c A numeric argument to a transpose command serves as a repeat count: it
@c tells the transpose command to move the character (word, sexp, line)
@c before or containing point across several other characters (words,
@c sexps, lines). For example, @kbd{C-u 3 C-t} moves the character before
@c point forward across three other characters. It would change
@c @samp{f@point{}oobar} into @samp{oobf@point{}ar}. This is equivalent to
@c repeating @kbd{C-t} three times. @kbd{C-u - 4 M-t} moves the word
@c before point backward across four words. @kbd{C-u - C-M-t} would cancel
@c the effect of plain @kbd{C-M-t}.@refill
$BF~$lBX$(%3%^%s%I$K?t0z?t$r;XDj$9$k$H!"H?I|2s?t$K$J$j$^$9!#(B
$B%]%$%s%H$ND>A0$d%]%$%s%H$r4^$`J8;z!JC18l!"(BS$B<0!"9T!K$r(B
$B$$$/$D@h$NJ8;z!JC18l!"(BS$B<0!"9T!K$X0\F0$9$k$+;XDj$7$^$9!#(B
$B$?$H$($P!"(B@kbd{C-u 3 C-t}$B$O!"%]%$%s%H$ND>A0$NJ8;z$r(B3$BJ8;z@h$NJ8;z$X0\F0$7$^$9!#(B
$B$D$^$j!"(B@samp{f@point{}oobar}$B$r(B@samp{oobf@point{}ar}$B$K$7$^$9!#(B
$B$3$l$O(B @kbd{C-t}$B$r(B3$B2s7+$jJV$7$?$N$HF1$8$3$H$G$9!#(B
@kbd{C-u - 4 M-t}$B$O!"%]%$%s%H$ND>A0$NC18l$r(B4$B$D$^$($NC18l$X0\F0$7$^$9!#(B
@kbd{C-u - C-M-t}$B$O!"0z?t$r;XDj$7$J$$(B@kbd{C-M-t}$B$N8z2L$rBG$A>C$7$^$9!#(B
@c A numeric argument of zero is assigned a special meaning (because
@c otherwise a command with a repeat count of zero would do nothing): to
@c transpose the character (word, sexp, line) ending after point with the
@c one ending after the mark.
$B?t0z?t(B0$B$K$OFCJL$J0UL#$,$"$j$^$9(B
$B!J$5$b$J$$$H!"%3%^%s%I$r(B0$B2s7+$jJV$7$F$b2?$b$7$J$$!K!#(B
$B%]%$%s%H$ND>8e$NJ8;z!JC18l!"(BS$B<0!"9T!K$H(B
$B%^!<%/$ND>8e$NJ8;z!JC18l!"(BS$B<0!"9T!K$rF~$lBX$($^$9!#(B
@node Fixing Case
@c @section Case Conversion
@section $BBgJ8;z>.J8;zJQ49(B
@table @kbd
@item M-- M-l
@c Convert last word to lower case. Note @kbd{Meta--} is Meta-minus.
$B%]%$%s%H$ND>A0$NC18l$r>.J8;z$KJQ49$9$k!#(B
@kbd{Meta--}$B$O%a%?!&%^%$%J%9!#(B
@item M-- M-u
@c Convert last word to all upper case.
$B%]%$%s%H$ND>A0$NC18l$r$9$Y$FBgJ8;z$KJQ49$9$k!#(B
@item M-- M-c
@c Convert last word to lower case with capital initial.
$B%]%$%s%H$ND>A0$NC18l$r:G=i$NJ8;z$@$1BgJ8;z$K$7$F;D$j$r>.J8;z$K$9$k!#(B
@end table
@kindex M-@t{-} M-l
@kindex M-@t{-} M-u
@kindex M-@t{-} M-c
@c A very common error is to type words in the wrong case. Because of this,
@c the word case-conversion commands @kbd{M-l}, @kbd{M-u} and @kbd{M-c} have a
@c special feature when used with a negative argument: they do not move the
@c cursor. As soon as you see you have mistyped the last word, you can simply
@c case-convert it and go on typing. @xref{Case}.@refill
$B$H$F$b$h$/$"$k$^$A$,$$$O!"C18l$rBG$D$H$-$KBgJ8;z>.J8;z$r$^$A$,$&$3$H$G$9!#(B
$B$3$N$?$a!"C18l$NBgJ8;z>.J8;z$rJQ49$9$k%3%^%s%I!"(B
@kbd{M-l}$B!"(B@kbd{M-u}$B!"(B@kbd{M-c}$B$KIi$N0z?t$r;XDj$9$k$H!"(B
$B%+!<%=%k!J%]%$%s%H!K$r0\F0$7$J$$$H$$$&FCJL$J5!G=$,$"$j$^$9!#(B
$BC18l$rBG$A$^$A$,$($?$H$9$0$K5$$E$$$?$H$-$K$O!"(B
$BC1$KBgJ8;z>.J8;z$rJQ49$7$F!"F~NO$rB3$1$i$l$^$9!#(B
@xref{Case}$B!#(B
@node Spelling
@c @section Checking and Correcting Spelling
@c @cindex spelling, checking and correcting
@c @cindex checking spelling
@c @cindex correcting spelling
@section $BDV$j$N8!::$HD{@5(B
@cindex $BDV$j!"8!::$HD{@5(B
@cindex $BDV$j$N8!::(B
@cindex $BDV$j$ND{@5(B
@c This section describes the commands to check the spelling of a single
@c word or of a portion of a buffer. These commands work with the spelling
@c checker program Ispell, which is not part of Emacs.
$BK\@a$G$O!"(B1$B$D$NC18l$d%P%C%U%!$N$"$kItJ,$NDV$j$r8!::$9$k%3%^%s%I$r@bL@$7$^$9!#(B
$B$3$l$i$N%3%^%s%I$O!"(BEmacs$B$N0lIt$G$O$J$$DV$j8!::%W%m%0%i%`(B
$B!J%9%Z%k%A%'%C%+!K(Bispell$B$r(B
$B;H$C$FF0:n$7$^$9!#(B
@ifinfo
@c @xref{Top, Ispell, Overview ispell, ispell.info, The Ispell Manual}.
@xref{Top, Ispell, Overview ispell, ispell.info, The Ispell Manual}$B!#(B
@end ifinfo
@table @kbd
@item M-x flyspell-mode
@c Enable Flyspell mode, which highlights all misspelled words.
$B%U%i%$%9%Z%k!J(Bflyspell$B!K%b!<%I$r%*%s$K$9$k!#(B
$BDV$j8m$j$N$"$k$9$Y$F$NC18l$r6/D4I=<($9$k!#(B
@item M-$
@c Check and correct spelling of the word at point (@code{ispell-word}).
$B%]%$%s%H0LCV$K$"$kC18l$NDV$j$r8!::$7D{@5$9$k(B
$B!J(B@code{ispell-word}$B!K!#(B
@item M-@key{TAB}
@c Complete the word before point based on the spelling dictionary
@c (@code{ispell-complete-word}).
$BDV$j<-=q$K4p$E$$$F%]%$%s%H$ND>A0$NC18l$rJd40$9$k(B
$B!J(B@code{ispell-complete-word}$B!K!#(B
@item M-x ispell-buffer
@c Check and correct spelling of each word in the buffer.
$B%P%C%U%!Fb$N3FC18l$NDV$j$r8!::$7D{@5$9$k!#(B
@item M-x ispell-region
@c Check and correct spelling of each word in the region.
$B%j!<%8%g%sFb$N3FC18l$NDV$j$r8!::$7D{@5$9$k!#(B
@item M-x ispell-message
@c Check and correct spelling of each word in a draft mail message,
@c excluding cited material.
$B0zMQItJ,$r=|$$$F!"%a%$%k%a%C%;!<%8$NAp9F$N3FC18l$NDV$j$r8!::$7D{@5$9$k!#(B
@item M-x ispell-change-dictionary @key{RET} @var{dict} @key{RET}
@c Restart the Ispell process, using @var{dict} as the dictionary.
$B<-=q$H$7$F(B@var{dict}$B$r;H$C$F(Bispell$B%W%m%;%9$r:F5/F0$9$k!#(B
@item M-x ispell-kill-ispell
@c Kill the Ispell subprocess.
ispell$B%W%m%;%9$r=*N;$5$;$k!#(B
@end table
@c @cindex Flyspell mode
@cindex $B%U%i%$%9%Z%k!J(Bflyspell$B!K%b!<%I(B
@findex flyspell-mode
@c Flyspell mode is a fully-automatic way to check spelling as you edit
@c in Emacs. It operates by checking words as you change or insert them.
@c When it finds a word that it does not recognize, it highlights that
@c word. This does not interfere with your editing, but when you see the
@c highlighted word, you can move to it and fix it. Type @kbd{M-x
@c flyspell-mode} to enable or disable this mode in the current buffer.
$B%U%i%$%9%Z%k!J(Bflyspell$B!K%b!<%I$O!"(B
Emacs$B$GJT=8$7$F$$$k$H$-$KA4<+F0$GDV$j8!::$r$9$kJ}K!$G$9!#(B
$BC18l$rJQ99$7$?$jA^F~$7$?$j$9$k$?$S$K$=$NC18l$r8!::$7$^$9!#(B
$BG'<1$G$-$J$$C18l$r$_$D$1$k$H!"$=$NC18l$r6/D4I=<($7$^$9!#(B
$B$3$l$O%f!<%6!<$NJT=8$K$O43>D$7$^$;$s$,!"(B
$B$"$kC18l$,6/D4I=<($5$l$?$i!"$=$NC18l$X0\F0$7$FD{@5$G$-$^$9!#(B
$B%+%l%s%H%P%C%U%!$G$3$N%b!<%I$r%*%s!?%*%U$9$k$K$O!"(B
@kbd{M-x flyspell-mode}$B$HBG$A$^$9!#(B
@c When Flyspell mode highlights a word as misspelled, you can click on
@c it with @kbd{Mouse-2} to display a menu of possible corrections and
@c actions. You can also correct the word by editing it manually in any
@c way you like.
$B%U%i%$%9%Z%k!J(Bflyspell$B!K%b!<%I$,(B
$B$"$kC18l$rDV$j$^$A$,$$$G$"$k$H6/D4I=<($7$?$H$-$K$O!"(B
$B$=$NC18l$r(B@kbd{Mouse-2}$B$G%/%j%C%/$G$-$^$9!#(B
$B$9$k$H!"D{@58uJd$d$I$s$JA`:n$r9T$($k$+I=<($5$l$^$9!#(B
$BC18l$r<jF0$GJT=8$7$F9%$-$J$h$&$KD{@5$7$F$b$+$^$$$^$;$s!#(B
@c The other Emacs spell-checking features check or look up words when
@c you give an explicit command to do so. Checking all or part of the
@c buffer is useful when you have text that was written outside of this
@c Emacs session and might contain any number of misspellings.
Emacs$B$NB>$NDV$j8!::5!G=$O!"L@<(E*$K%3%^%s%I$r<B9T$7$?$H$-$K(B
$BC18l$N8!::$r9T$$$^$9!#(B
$B%P%C%U%!A4BN$d$=$N0lItJ,$NDV$j$r8!::$9$k5!G=$O!"(B
Emacs$B%;%C%7%g%s0J30$G:n@.$7$?DV$j8m$j$r4^$`$+$b$7$l$J$$%F%-%9%H$K$OM-1W$G$9!#(B
@kindex M-$
@findex ispell-word
@c To check the spelling of the word around or next to point, and
@c optionally correct it as well, use the command @kbd{M-$}
@c (@code{ispell-word}). If the word is not correct, the command offers
@c you various alternatives for what to do about it.
$B%]%$%s%H$N<~$j$+%]%$%s%H$N$D$.$K$"$kC18l$NDV$j$r8!::$7!"(B
$B>l9g$K$h$C$F$OD{@5$9$k$K$O!"(B
@kbd{M-$}$B!J(B@code{ispell-word}$B!K%3%^%s%I$r;H$$$^$9!#(B
$BC18l$,@5$7$/$J$$$H$-$K$O!"(B
$B$=$NC18l$K$D$$$F$I$&$9$k$+$N$5$^$6$^$JA*Br;h$rDs<($7$^$9!#(B
@findex ispell-buffer
@findex ispell-region
@c To check the entire current buffer, use @kbd{M-x ispell-buffer}. Use
@c @kbd{M-x ispell-region} to check just the current region. To check
@c spelling in an email message you are writing, use @kbd{M-x
@c ispell-message}; that checks the whole buffer, but does not check
@c material that is indented or appears to be cited from other messages.
$B%+%l%s%H%P%C%U%!A4BN$r8!::$9$k$K$O!"(B@kbd{M-x ispell-buffer}$B$r;H$$$^$9!#(B
$B%+%l%s%H%j!<%8%g%s$@$1$r8!::$9$k$K$O!"(B@kbd{M-x ispell-region}$B$r;H$$$^$9!#(B
$B=q$-$+$1$NEE;R%a%$%k%a%C%;!<%8$NDV$j$r8!::$9$k$K$O!"(B
@kbd{M-x ispell-message}$B$r;H$$$^$9!#(B
$B$3$l$O!"%P%C%U%!A4BN$r8!::$7$^$9$,!"(B
$B;z2<$2$7$F$"$kItJ,$dB>$N%a%C%;!<%8$+$i$N0zMQ$H;W$o$l$kItJ,$O8!::$7$^$;$s!#(B
@c Each time these commands encounter an incorrect word, they ask you
@c what to do. They display a list of alternatives, usually including
@c several ``near-misses''---words that are close to the word being
@c checked. Then you must type a character. Here are the valid responses:
$B$3$l$i$N%3%^%s%I$O!"@5$7$/$J$$C18l$K=P2q$&$?$S$K!"$I$&$9$k$+J9$$$F$-$^$9!#(B
$BDL>o!"8!::$7$?C18l$K;w$F$$$k!X6a$$!YC18l$r$$$/$D$+4^$a$?(B
$BA*Br;h0lMw$rI=<($7$^$9!#(B
$B$=$&$7$?$i!"J8;z$rBG$?$J$/$F$O$J$j$^$;$s!#(B
$B0J2<$KM-8z$JJVEz$r$"$2$^$9!#(B
@table @kbd
@item @key{SPC}
@c Skip this word---continue to consider it incorrect, but don't change it
@c here.
$B$3$NC18l$r%9%-%C%W$9$k!#(B
$B$3$NC18l$O@5$7$/$J$$$H$7$F$*$/$,!"$3$3$G$OJQ99$7$J$$!#(B
@item r @var{new} @key{RET}
@c Replace the word (just this time) with @var{new}.
$B!J:#2s$@$1$O!K(B@var{new}$B$GCV$-49$($k!#(B
@item R @var{new} @key{RET}
@c Replace the word with @var{new}, and do a @code{query-replace} so you
@c can replace it elsewhere in the buffer if you wish.
$BC18l$r(B@var{new}$B$GCV$-49$($k!#(B
$B$5$i$K!"%P%C%U%!$NB>$N2U=j$G$bCV$-49$($i$l$k$h$&$K(B
@code{query-replace}$B$r<B9T$9$k!#(B
@item @var{digit}
@c Replace the word (just this time) with one of the displayed
@c near-misses. Each near-miss is listed with a digit; type that digit to
@c select it.
$B!J:#2s$@$1$O!K$3$NC18l$r!X6a$$!YC18l$N(B1$B$D$GCV$-49$($k!#(B
$B!X6a$$!YC18l$K$O$=$l$>$l?t;z$,IU$$$F$$$k$N$G!"$=$N?t;z$rBG$D!#(B
@item a
@c Accept the incorrect word---treat it as correct, but only in this
@c editing session.
$B@5$7$/$J$$C18l$rMFG'$9$k!#(B
$B$3$NJT=8%;%C%7%g%s$K8B$C$F!"@5$7$$$+$N$h$&$K07$&!#(B
@item A
@c Accept the incorrect word---treat it as correct, but only in this
@c editing session and for this buffer.
$B@5$7$/$J$$C18l$rMFG'$9$k!#(B
$B$3$NJT=8%;%C%7%g%s$N$3$N%P%C%U%!$K8B$C$F!"@5$7$$$+$N$h$&$K07$&!#(B
@item i
@c Insert this word in your private dictionary file so that Ispell will
@c consider it correct it from now on, even in future sessions.
$B$3$NC18l$r8D?M<-=q%U%!%$%k$KF~$l!"(B
ispell$B$O:#8e$N%;%C%7%g%s$r4^$a$F$3$l0J9_$3$NC18l$r@5$7$$$b$N$H$7$F07$&!#(B
@item u
@c Insert the lower-case version of this word in your private dictionary
@c file.
$B$3$NC18l$r>.J8;z$KJQ49$7$F8D?M<-=q%U%!%$%k$KF~$l$k!#(B
@item m
@c Like @kbd{i}, but you can also specify dictionary completion
@c information.
@kbd{i}$B$HF1MM$@$,!"<-=q$NJd40>pJs$b5-O?$G$-$k!#(B
@item l @var{word} @key{RET}
@c Look in the dictionary for words that match @var{word}. These words
@c become the new list of ``near-misses''; you can select one of them to
@c replace with by typing a digit. You can use @samp{*} in @var{word} as a
@c wildcard.
@var{word}$B$K0lCW$9$kC18l$r<-=q$+$iC5$9!#(B
$B$_$D$+$C$?C18l$O!"?7$?$J!X6a$$!YC18l0lMw$H$J$j!"(B
$B?t;z$rBG$C$FCV$-49$($kC18l$rA*$Y$k!#(B
@var{word}$B$K$O!"%o%$%k%I%+!<%I(B@samp{*}$B$r;H$&$3$H$b$G$-$k!#(B
@item C-g
@c Quit interactive spell checking. You can restart it again afterward
@c with @kbd{C-u M-$}.
$BBPOCE*$JDV$j8!::$r=*N;$9$k!#(B
@kbd{C-u M-$}$B$G!"$"$H$G:F3+$G$-$k!#(B
@item X
@c Same as @kbd{C-g}.
@kbd{C-g}$B$HF1$8!#(B
@item x
@c Quit interactive spell checking and move point back to where it was
@c when you started spell checking.
$BBPOCE*$JDV$j8!::$r=*N;$7!"DV$j8!::$r;O$a$?2U=j$X%]%$%s%H$rLa$9!#(B
@item q
@c Quit interactive spell checking and kill the Ispell subprocess.
$BBPOCE*$JDV$j8!::$r=*N;$7!"(Bispell$B%W%m%;%9$r=*N;$5$;$k!#(B
@item C-l
@c Refresh the screen.
$B2hLL$r:FIA2h$9$k!#(B
@item C-z
@c This key has its normal command meaning (suspend Emacs or iconify this
@c frame).
$B$3$N%-!<$OIaDL$N%3%^%s%I$N0UL#(B
$B!J(BEmacs$B$r5Y;_$9$k!"$"$k$$$O!"$3$N%U%l!<%`$r%"%$%3%s2=$9$k!K!#(B
@end table
@findex ispell-complete-word
@c The command @code{ispell-complete-word}, which is bound to the key
@c @kbd{M-@key{TAB}} in Text mode and related modes, shows a list of
@c completions based on spelling correction. Insert the beginning of a
@c word, and then type @kbd{M-@key{TAB}}; the command displays a completion
@c list window. To choose one of the completions listed, click
@c @kbd{Mouse-2} on it, or move the cursor there in the completions window
@c and type @key{RET}. @xref{Text Mode}.
$B%F%-%9%H!J(Btext$B!K%b!<%I$d$=$N4XO"$7$?%b!<%I$G$O(B
@kbd{M-@key{TAB}}$B%-!<$K%P%$%s%I$7$F$"$k%3%^%s%I(B
@code{ispell-complete-word}$B$O!"(B
$BDV$jD{@5$K4p$E$$$?Jd400lMw$rDs<($7$^$9!#(B
$BC18l$N;O$a$NItJ,$rA^F~$7$F$+$i(B@kbd{M-@key{TAB}}$B$HBG$D$H!"(B
$BJd400lMw%&%#%s%I%&$rI=<($7$^$9!#(B
$BJd400lMw$+$i(B1$B$D$rA*$V$K$O!"(B
$B8uJd$N$&$($G(B@kbd{Mouse-2}$B$r%/%j%C%/$9$k$+!"(B
$B%+!<%=%k$rJd40%&%#%s%I%&$NC18l$N2U=j$K0\F0$7$F$+$i(B
@key{RET}$B$HBG$A$^$9!#(B
@xref{Text Mode}$B!#(B
@ignore
@findex reload-ispell
The first time you use any of the spell checking commands, it starts
an Ispell subprocess. The first thing the subprocess does is read your
private dictionary, which defaults to the file @file{~/ispell.words}.
Words that you ``insert'' with the @kbd{i} command are added to that
file, but not right away---only at the end of the interactive
replacement procedure. Use the @kbd{M-x reload-ispell} command to
reload your private dictionary if you edit the file outside of Ispell.
@end ignore
@c @cindex @code{ispell} program
@cindex @code{ispell}$B%W%m%0%i%`(B
@findex ispell-kill-ispell
@c Once started, the Ispell subprocess continues to run (waiting for
@c something to do), so that subsequent spell checking commands complete
@c more quickly. If you want to get rid of the Ispell process, use
@c @kbd{M-x ispell-kill-ispell}. This is not usually necessary, since the
@c process uses no time except when you do spelling correction.
$B0lEYDV$j8!::$r9T$&$H!"(Bispell$B%W%m%;%9$O!J2?$+$9$k$3$H$rBT$C$F!K(B
$BF0$-B3$1$^$9!#(B
$B$G$9$+$i!"$D$.$KDV$j8!::%3%^%s%I$r;H$&$H!"(B
$B$h$jAa$/<B9T$r40N;$7$^$9!#(B
ispell$B%W%m%;%9$r<h$j=|$-$?$$$H$-$K$O!"(B
@kbd{M-x ispell-kill-ispell}$B$r;H$$$^$9!#(B
ispell$B%W%m%;%9$ODV$jD{@5$r$7$F$$$k$H$-0J30$K$O2?$b$7$J$$$N$G!"(B
$BDL>o$O$3$N%3%^%s%I$r;H$&I,MW$O$"$j$^$;$s!#(B
@vindex ispell-dictionary
@c Ispell uses two dictionaries: the standard dictionary and your private
@c dictionary. The variable @code{ispell-dictionary} specifies the file
@c name of the standard dictionary to use. A value of @code{nil} says to
@c use the default dictionary. The command @kbd{M-x
@c ispell-change-dictionary} sets this variable and then restarts the
@c Ispell subprocess, so that it will use a different dictionary.
ispell$B$O(B2$B$D$N<-=q$r;H$$$^$9!#(B
$BI8=`<-=q$H8D?M<-=q$G$9!#(B
$BJQ?t(B@code{ispell-dictionary}$B$O!";HMQ$9$Y$-I8=`<-=q$N%U%!%$%kL>$r;XDj$7$^$9!#(B
$B$3$NCM$,(B@code{nil}$B$J$i$P!"%G%U%)%k%H$N<-=q$r;H$$$^$9!#(B
@kbd{M-x ispell-change-dictionary}$B%3%^%s%I$O$3$NJQ?t$r@_Dj$7$F!"(B
$B@_Dj$7$?<-=q$r;H$&$h$&$K(Bispell$B%5%V%W%m%;%9$r:F5/F0$7$^$9!#(B
|