Function: checkdoc
checkdoc is an autoloaded, interactive and byte-compiled function
defined in checkdoc.el.gz.
Signature
(checkdoc)
Documentation
Interactively check the entire buffer for style errors.
The current status of the check will be displayed in a buffer which the users will view as each check is completed.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/checkdoc.el.gz
;;; User level commands
;;
;;;###autoload
(defun checkdoc ()
"Interactively check the entire buffer for style errors.
The current status of the check will be displayed in a buffer which
the users will view as each check is completed."
(interactive nil emacs-lisp-mode)
(let ((status (list "Checking..." "-" "-" "-"))
(checkdoc-spellcheck-documentation-flag
(car (memq checkdoc-spellcheck-documentation-flag
'(buffer interactive t))))
;; if the user set autofix to never, then that breaks the
;; obviously requested asking implied by using this function.
;; Set it to paranoia level.
(checkdoc-autofix-flag (if (or (not checkdoc-autofix-flag)
(eq checkdoc-autofix-flag 'never))
'query
checkdoc-autofix-flag))
tmp)
(checkdoc-display-status-buffer status)
;; check the comments
(setf (nth 0 status)
(cond
((not buffer-file-name) "Not checked")
((checkdoc-file-comments-engine) "Errors")
(t "Ok")))
(setf (nth 1 status) "Checking...")
(checkdoc-display-status-buffer status)
;; Check the documentation
(setq tmp (checkdoc-interactive nil t))
(setf (nth 1 status)
(if tmp (format "%d Errors" (length tmp)) "Ok"))
(setf (nth 2 status) "Checking...")
(checkdoc-display-status-buffer status)
;; Check the message text
(setf (nth 2 status)
(if (setq tmp (checkdoc-message-interactive nil t))
(format "%d Errors" (length tmp))
"Ok"))
(setf (nth 3 status) "Checking...")
(checkdoc-display-status-buffer status)
;; Rogue spacing
(setf (nth 3 status)
(if (ignore-errors (checkdoc-rogue-spaces nil t))
"Errors"
"Ok"))
(checkdoc-display-status-buffer status)))