spell.elc 2.0 KB

12345678910111213141516171819202122232425
  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 before point.
  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 looking-at "\\<" forward-word -1 1 spell-region buffer-substring] 9))
  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. ÔÄ%‚DpŠqˆÕ
  16. #ˆÒcˆÓedÔÆ%))ˆÏÖ †LÑŠqˆ× ØV)ƒ\\Ù‚]Ú#ˆÄÄÆÆ
  17.  Šqˆ× ØV)…ÊŠqˆebˆÛ`Ü ˆ`\"‰ˆÝÞ!ˆße`\"ˆàáâQ\"‰ˆãäå!æQ!)ˆç\"?ƒÅebˆèéå!éQ\"‚ÆÄˆ‚k,)‡" [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 "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"] 24))
  18. (defun spell-string (string) "\
  19. Check spelling of string supplied as argument." (interactive "sSpell string: ") (byte-code "ÈÄÅ!ŠqˆÆ ˆÇ ˆÈ É\"ˆÊedËÂÂ%ˆÌÍ Uƒ+ÎÏ \"‚EebˆÐÉÃÂ#…=ÑÒ!ˆ‚.ˆÎÓÔÕd\"\"))‡" [buf string t nil get-buffer-create " *temp*" widen erase-buffer insert "
  20. " call-process-region "spell" 0 buffer-size message "%s is correct" search-forward replace-match " " "%sincorrect" buffer-substring 1] 14))