comparison lisp/textmodes/ispell.el @ 75880:7717e4bf7aef

(ispell-keep-choices-win, ispell-dictionary-alist, ispell-word, ispell-begin-skip-region-regexp): Fix typos in docstrings. (ispell-process-line): Doc fixes. (ispell-help): Fix typos in docstring and output message.
author Juanma Barranquero <lekktu@gmail.com>
date Wed, 14 Feb 2007 12:38:55 +0000
parents e3694f1cb928
children 67f0213ebfd7
comparison
equal deleted inserted replaced
75879:0713e22d4411 75880:7717e4bf7aef
291 291
292 (defvar ispell-tib-ref-end "\\.[]>]" 292 (defvar ispell-tib-ref-end "\\.[]>]"
293 "Regexp matching the end of a Tib reference.") 293 "Regexp matching the end of a Tib reference.")
294 294
295 (defcustom ispell-keep-choices-win t 295 (defcustom ispell-keep-choices-win t
296 "*When not nil, the `*Choices*' window remains for spelling session. 296 "*When non-nil, the `*Choices*' window remains for spelling session.
297 This minimizes redisplay thrashing." 297 This minimizes redisplay thrashing."
298 :type 'boolean 298 :type 'boolean
299 :group 'ispell) 299 :group 'ispell)
300 300
301 (defcustom ispell-choices-win-default-height 2 301 (defcustom ispell-choices-win-default-height 2
671 ISPELL-ARGS EXTENDED-CHARACTER-MODE CHARACTER-SET\) 671 ISPELL-ARGS EXTENDED-CHARACTER-MODE CHARACTER-SET\)
672 672
673 DICTIONARY-NAME is a possible string value of variable `ispell-dictionary', 673 DICTIONARY-NAME is a possible string value of variable `ispell-dictionary',
674 nil means the default dictionary. 674 nil means the default dictionary.
675 675
676 CASECHARS is a regular expression of valid characters that comprise a 676 CASECHARS is a regular expression of valid characters that comprise a word.
677 word.
678 677
679 NOT-CASECHARS is the opposite regexp of CASECHARS. 678 NOT-CASECHARS is the opposite regexp of CASECHARS.
680 679
681 OTHERCHARS is a regexp of characters in the NOT-CASECHARS set but which can be 680 OTHERCHARS is a regexp of characters in the NOT-CASECHARS set but which can be
682 used to construct words in some special way. If OTHERCHARS characters follow 681 used to construct words in some special way. If OTHERCHARS characters follow
686 \"Steven's\" are parsed as single words including the \"'\" character, but 685 \"Steven's\" are parsed as single words including the \"'\" character, but
687 \"Stevens'\" does not include the quote character as part of the word. 686 \"Stevens'\" does not include the quote character as part of the word.
688 If you want OTHERCHARS to be empty, use the empty string. 687 If you want OTHERCHARS to be empty, use the empty string.
689 Hint: regexp syntax requires the hyphen to be declared first here. 688 Hint: regexp syntax requires the hyphen to be declared first here.
690 689
691 CASECHAS, NOT-CASECHARS, and OTHERCHARS must be a unibyte string 690 CASECHARS, NOT-CASECHARS, and OTHERCHARS must be a unibyte string
692 containing bytes of CHARACTER-SET. In addition, if they contain 691 containing bytes of CHARACTER-SET. In addition, if they contain
693 a non-ASCII byte, the regular expression must be a single 692 a non-ASCII byte, the regular expression must be a single
694 `character set' construct that doesn't specify a character range 693 `character set' construct that doesn't specify a character range
695 for non-ASCII bytes. 694 for non-ASCII bytes.
696 695
1570 which is in `ispell-local-dictionary-alist' or `ispell-dictionary-alist'. 1569 which is in `ispell-local-dictionary-alist' or `ispell-dictionary-alist'.
1571 1570
1572 This will check or reload the dictionary. Use \\[ispell-change-dictionary] 1571 This will check or reload the dictionary. Use \\[ispell-change-dictionary]
1573 or \\[ispell-region] to update the Ispell process. 1572 or \\[ispell-region] to update the Ispell process.
1574 1573
1575 return values: 1574 Return values:
1576 nil word is correct or spelling is accepted. 1575 nil word is correct or spelling is accepted.
1577 0 word is inserted into buffer-local definitions. 1576 0 word is inserted into buffer-local definitions.
1578 \"word\" word corrected from word list. 1577 \"word\" word corrected from word list.
1579 \(\"word\" arg\) word is hand entered. 1578 \(\"word\" arg\) word is hand entered.
1580 quit spell session exited." 1579 quit spell session exited."
2100 the aborted check to be completed later. 2099 the aborted check to be completed later.
2101 `q': Quit spelling session (Kills ispell process). 2100 `q': Quit spelling session (Kills ispell process).
2102 `l': Look up typed-in replacement in alternate dictionary. Wildcards okay. 2101 `l': Look up typed-in replacement in alternate dictionary. Wildcards okay.
2103 `u': Like `i', but the word is lower-cased first. 2102 `u': Like `i', but the word is lower-cased first.
2104 `m': Place typed-in value in personal dictionary, then recheck current word. 2103 `m': Place typed-in value in personal dictionary, then recheck current word.
2105 `C-l': redraws screen 2104 `C-l': Redraw screen.
2106 `C-r': recursive edit 2105 `C-r': Recursive edit.
2107 `C-z': suspend Emacs or iconify frame" 2106 `C-z': Suspend Emacs or iconify frame."
2108 2107
2109 (if (equal ispell-help-in-bufferp 'electric) 2108 (if (equal ispell-help-in-bufferp 'electric)
2110 (progn 2109 (progn
2111 (require 'ehelp) 2110 (require 'ehelp)
2112 (with-electric-help 2111 (with-electric-help
2132 the aborted check to be completed later. 2131 the aborted check to be completed later.
2133 `q': Quit spelling session (Kills ispell process). 2132 `q': Quit spelling session (Kills ispell process).
2134 `l': Look up typed-in replacement in alternate dictionary. Wildcards okay. 2133 `l': Look up typed-in replacement in alternate dictionary. Wildcards okay.
2135 `u': Like `i', but the word is lower-cased first. 2134 `u': Like `i', but the word is lower-cased first.
2136 `m': Place typed-in value in personal dictionary, then recheck current word. 2135 `m': Place typed-in value in personal dictionary, then recheck current word.
2137 `C-l': redraws screen 2136 `C-l': Redraw screen.
2138 `C-r': recursive edit 2137 `C-r': Recursive edit.
2139 `C-z': suspend Emacs or iconify frame") 2138 `C-z': Suspend Emacs or iconify frame.")
2140 nil ;undocumented requirement of with-electric-help 2139 nil))))
2141 ))))
2142 2140
2143 2141
2144 (let ((help-1 (concat "[r/R]eplace word; [a/A]ccept for this session; " 2142 (let ((help-1 (concat "[r/R]eplace word; [a/A]ccept for this session; "
2145 "[i]nsert into private dictionary")) 2143 "[i]nsert into private dictionary"))
2146 (help-2 (concat "[l]ook a word up in alternate dictionary; " 2144 (help-2 (concat "[l]ook a word up in alternate dictionary; "
2770 2768
2771 2769
2772 (defun ispell-begin-skip-region-regexp () 2770 (defun ispell-begin-skip-region-regexp ()
2773 "Returns a regexp of the search keys for region skipping. 2771 "Returns a regexp of the search keys for region skipping.
2774 Includes `ispell-skip-region-alist' plus tex, tib, html, and comment keys. 2772 Includes `ispell-skip-region-alist' plus tex, tib, html, and comment keys.
2775 Must call after ispell-buffer-local-parsing due to dependence on mode." 2773 Must call after `ispell-buffer-local-parsing' due to dependence on mode."
2776 ;; start with regions generic to all buffers 2774 ;; start with regions generic to all buffers
2777 (let ((skip-regexp (ispell-begin-skip-region ispell-skip-region-alist))) 2775 (let ((skip-regexp (ispell-begin-skip-region ispell-skip-region-alist)))
2778 ;; Comments 2776 ;; Comments
2779 (if (and (null ispell-check-comments) comment-start) 2777 (if (and (null ispell-check-comments) comment-start)
2780 (setq skip-regexp (concat (regexp-quote comment-start) "\\|" 2778 (setq skip-regexp (concat (regexp-quote comment-start) "\\|"
2983 ;;; Avoid error messages when compiling for these dynamic variables. 2981 ;;; Avoid error messages when compiling for these dynamic variables.
2984 (defvar start) 2982 (defvar start)
2985 (defvar end) 2983 (defvar end)
2986 2984
2987 (defun ispell-process-line (string shift) 2985 (defun ispell-process-line (string shift)
2988 "Sends a LINE of text to ispell and processes the result. 2986 "Sends STRING, a line of text, to ispell and processes the result.
2989 This will modify the buffer for spelling errors. 2987 This will modify the buffer for spelling errors.
2990 Requires variables START and END to be defined in its lexical scope. 2988 Requires variables START and END to be defined in its lexical scope.
2991 Returns the sum shift due to changes in word replacements." 2989 Returns the sum SHIFT due to changes in word replacements."
2992 ;;(declare special start end) 2990 ;;(declare special start end)
2993 (let (poss accept-list) 2991 (let (poss accept-list)
2994 (if (not (numberp shift)) 2992 (if (not (numberp shift))
2995 (setq shift 0)) 2993 (setq shift 0))
2996 ;; send string to spell process and get input. 2994 ;; send string to spell process and get input.