comparison lisp/emacs-lisp/checkdoc.el @ 22514:dee11277c07d

(checkdoc-eval-defun): Doc fix. (checkdoc-continue, checkdoc-tripple-semi-comment-check-flag): Ditto. (checkdoc-common-verbs-wrong-voice): Use dotted pairs.
author Karl Heuer <kwzh@gnu.org>
date Fri, 19 Jun 1998 19:21:23 +0000
parents bab34c7c16fb
children d0ad271c7774
comparison
equal deleted inserted replaced
22513:bbf2827a9356 22514:dee11277c07d
74 ;; running. Use `ispell-kill-ispell' to make checkdoc restart it with 74 ;; running. Use `ispell-kill-ispell' to make checkdoc restart it with
75 ;; these words enabled. 75 ;; these words enabled.
76 ;; 76 ;;
77 ;; Checking parameters 77 ;; Checking parameters
78 ;; 78 ;;
79 ;; You might not always want a function to have it's parameters listed 79 ;; You might not always want a function to have its parameters listed
80 ;; in order. When this is the case, put the following comment just in 80 ;; in order. When this is the case, put the following comment just in
81 ;; front of the documentation string: "; checkdoc-order: nil" This 81 ;; front of the documentation string: "; checkdoc-order: nil" This
82 ;; overrides the value of `checkdoc-arguments-in-order-flag'. 82 ;; overrides the value of `checkdoc-arguments-in-order-flag'.
83 ;; 83 ;;
84 ;; If you specifically wish to avoid mentioning a parameter of a 84 ;; If you specifically wish to avoid mentioning a parameter of a
171 ;;; Title 171 ;;; Title
172 ;; text 172 ;; text
173 ;; text 173 ;; text
174 But when inside a function, code can be commented out using the ;;; 174 But when inside a function, code can be commented out using the ;;;
175 construct for all lines. When this variable is nil, the ;;; construct 175 construct for all lines. When this variable is nil, the ;;; construct
176 is ignored regardless of it's location in the code." 176 is ignored regardless of its location in the code."
177 :group 'checkdoc 177 :group 'checkdoc
178 :type 'boolean) 178 :type 'boolean)
179 179
180 (defcustom checkdoc-spellcheck-documentation-flag nil 180 (defcustom checkdoc-spellcheck-documentation-flag nil
181 "*Non-nil means run Ispell on doc strings based on value. 181 "*Non-nil means run Ispell on doc strings based on value.
249 249
250 (defvar checkdoc-common-verbs-wrong-voice 250 (defvar checkdoc-common-verbs-wrong-voice
251 '(("adds" . "add") 251 '(("adds" . "add")
252 ("allows" . "allow") 252 ("allows" . "allow")
253 ("appends" . "append") 253 ("appends" . "append")
254 ("applies" "apply") 254 ("applies" . "apply")
255 ("arranges" "arrange") 255 ("arranges" . "arrange")
256 ("brings" . "bring") 256 ("brings" . "bring")
257 ("calls" . "call") 257 ("calls" . "call")
258 ("catches" . "catch") 258 ("catches" . "catch")
259 ("changes" . "change") 259 ("changes" . "change")
260 ("checks" . "check") 260 ("checks" . "check")
261 ("contains" . "contain") 261 ("contains" . "contain")
262 ("creates" . "create") 262 ("creates" . "create")
263 ("destroys" . "destroy") 263 ("destroys" . "destroy")
264 ("disables" . "disable") 264 ("disables" . "disable")
265 ("executes" . "execute") 265 ("executes" . "execute")
266 ("evals" . "evaluate") 266 ("evals" . "evaluate")
267 ("evaluates" . "evaluate") 267 ("evaluates" . "evaluate")
268 ("finds" . "find") 268 ("finds" . "find")
269 ("forces" . "force") 269 ("forces" . "force")
270 ("gathers" . "gather") 270 ("gathers" . "gather")
271 ("generates" . "generate") 271 ("generates" . "generate")
315 ("stores" . "store") 315 ("stores" . "store")
316 ("switches" . "switch") 316 ("switches" . "switch")
317 ("tells" . "tell") 317 ("tells" . "tell")
318 ("tests" . "test") 318 ("tests" . "test")
319 ("toggles" . "toggle") 319 ("toggles" . "toggle")
320 ("tries" . "try") 320 ("tries" . "try")
321 ("turns" . "turn") 321 ("turns" . "turn")
322 ("undoes" . "undo") 322 ("undoes" . "undo")
323 ("unloads" . "unload") 323 ("unloads" . "unload")
324 ("unmarks" . "unmark") 324 ("unmarks" . "unmark")
325 ("updates" . "update") 325 ("updates" . "update")
530 530
531 ;;;###autoload 531 ;;;###autoload
532 (defun checkdoc-continue (&optional take-notes) 532 (defun checkdoc-continue (&optional take-notes)
533 "Find the next docstring in the current buffer which is stylisticly poor. 533 "Find the next docstring in the current buffer which is stylisticly poor.
534 Prefix argument TAKE-NOTES means to continue through the whole buffer and 534 Prefix argument TAKE-NOTES means to continue through the whole buffer and
535 save warnings in a separate buffer. Second optional argument START-POINT 535 save warnings in a separate buffer."
536 is the starting location. If this is nil, `point-min' is used instead."
537 (interactive "P") 536 (interactive "P")
538 (let ((wrong nil) (msg nil) (errors nil) 537 (let ((wrong nil) (msg nil) (errors nil)
539 ;; Assign a flag to spellcheck flag 538 ;; Assign a flag to spellcheck flag
540 (checkdoc-spellcheck-documentation-flag 539 (checkdoc-spellcheck-documentation-flag
541 (member checkdoc-spellcheck-documentation-flag 540 (member checkdoc-spellcheck-documentation-flag
616 (if e (message e) (message "Space Check: done."))))) 615 (if e (message e) (message "Space Check: done.")))))
617 616
618 617
619 ;;;###autoload 618 ;;;###autoload
620 (defun checkdoc-eval-defun () 619 (defun checkdoc-eval-defun ()
621 "Evaluate the current form with `eval-defun' and check it's documentation. 620 "Evaluate the current form with `eval-defun' and check its documentation.
622 Evaluation is done first so the form will be read before the 621 Evaluation is done first so the form will be read before the
623 documentation is checked. If there is a documentation error, then the display 622 documentation is checked. If there is a documentation error, then the display
624 of what was evaluated will be overwritten by the diagnostic message." 623 of what was evaluated will be overwritten by the diagnostic message."
625 (interactive) 624 (interactive)
626 (eval-defun nil) 625 (eval-defun nil)