spell.elc 1.9 KB

12345678910111213141516171819202122232425262728
  1. (defun spell-buffer nil "\
  2. Check spelling of every word in the buffer.
  3. For each incorrect word, you are asked for the correct spelling
  4. and then put into a query-replace to fix some or all occurrences.
  5. If you do not want to change a word, just give the same word
  6. as its \"correct\" spelling; then the query replace is skipped." (interactive) (byte-code "ÀˆÁedÂ#‡" [nil spell-region "buffer"] 4))
  7. (defun spell-word nil "\
  8. Check spelling of word at or after dot.
  9. If it is not correct, ask user for the correct spelling
  10. and query-replace the entire buffer to substitute it." (interactive) (byte-code "ˆÂŠÃÄ!ˆ`‰ˆÃÅ!ˆ`‰)ˆÆ Ç \"#*‡" [beg end nil forward-word 1 -1 spell-region buffer-substring] 11))
  11. (defun spell-region (start end &optional description) "\
  12. Like spell-buffer but applies only to region.
  13. From program, applies from START to END." (interactive "r") (byte-code "ĈËÌ!ŠqˆÍ ˆÎ )ˆÏÐ †Ñ\"ˆÒ
  14. SfUƒ,Ó
  15. Ô %‚EpŠqˆÕ
  16. #ˆÒcˆÓedÔ%))ˆÏÖ †MÑŠqˆ× ØV)ƒ]Ù‚^Ú#ˆÄÄ
  17.  Šqˆ× ØV)…ÍŠqˆebˆÛ`Ü ˆ`\"‰ˆÝÞ!ˆße`\"ˆàáâQ\"‰ˆãäå!æQ!)ˆç\"?ƒÈebˆèéå!éQ\"‚ÉĈ‚n,)‡" [buf description end start nil oldbuf t word newword case-fold-search case-replace get-buffer-create " *temp*" widen erase-buffer message "Checking spelling of %s..." "region" 10 call-process-region "/usr/bin/spell" insert-buffer-substring "Checking spelling of %s...%s" buffer-size 0 "not correct" "correct" buffer-substring end-of-line forward-char 1 delete-region read-input "Replacement for " ": " flush-lines "^" regexp-quote "$" equal query-replace-regexp "\\b"] 45))
  18. (defun spell-string (string) "\
  19. Check spelling of string supplied as argument." (interactive "sSpell string: ") (byte-code "ÈÄÅ!ŠqˆÆ ˆÇ ˆÈ É\"ˆÊedË
  20. %ˆÌÍ Uƒ+ÎÏ \"‚EebˆÐÉ
  21. #…=ÑÒ!ˆ‚.ˆÎÓÔÕd\"\"))‡" [buf string t nil get-buffer-create " *temp*" widen erase-buffer insert "
  22. " call-process-region "/usr/bin/spell" 0 buffer-size message "%s is correct" search-forward replace-match " " "%sincorrect" buffer-substring 1] 18))