12345678910111213141516171819202122232425262728 |
- (defun spell-buffer nil "\
- Check spelling of every word in the buffer.
- For each incorrect word, you are asked for the correct spelling
- and then put into a query-replace to fix some or all occurrences.
- If you do not want to change a word, just give the same word
- as its \"correct\" spelling; then the query replace is skipped." (interactive) (byte-code "ÀˆÁedÂ#‡" [nil spell-region "buffer"] 4))
- (defun spell-word nil "\
- Check spelling of word at or after dot.
- If it is not correct, ask user for the correct spelling
- and query-replace the entire buffer to substitute it." (interactive) (byte-code "ˆÂŠÃÄ!ˆ`‰ˆÃÅ!ˆ`‰)ˆÆ Ç \"#*‡" [beg end nil forward-word 1 -1 spell-region buffer-substring] 11))
- (defun spell-region (start end &optional description) "\
- Like spell-buffer but applies only to region.
- From program, applies from START to END." (interactive "r") (byte-code "ĈËÌ!ŠqˆÍ ˆÎ )ˆÏÐ † Ñ\"ˆÒ
- SfUƒ, Ó
- Ô%‚E pŠqˆÕ
- #ˆÒcˆÓedÔ%))ˆÏÖ †M ÑŠqˆ× ØV)ƒ] Ù‚^ Ú#ˆÄÄ
- Š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))
- (defun spell-string (string) "\
- Check spelling of string supplied as argument." (interactive "sSpell string: ") (byte-code "ÈÄÅ!ŠqˆÆ ˆÇ ˆÈ É\"ˆÊedË
- %ˆÌÍ Uƒ+ ÎÏ \"‚E ebˆÐÉ
- #…= ÑÒ!ˆ‚. ˆÎÓÔÕd\"\"))‡" [buf string t nil get-buffer-create " *temp*" widen erase-buffer insert "
- " call-process-region "/usr/bin/spell" 0 buffer-size message "%s is correct" search-forward replace-match " " "%sincorrect" buffer-substring 1] 18))
|