Function: checkdoc-next-message-error

checkdoc-next-message-error is a byte-compiled function defined in checkdoc.el.gz.

Signature

(checkdoc-next-message-error ENABLE-FIX)

Documentation

Find and return the next checkdoc message related error list, or nil.

Only text for error and y-or-n-p strings are checked. See checkdoc-next-error for details on the return value. Argument ENABLE-FIX turns on the auto-fix feature. This argument assumes that the cursor is already positioned to perform the fix.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/checkdoc.el.gz
(defun checkdoc-next-message-error (enable-fix)
  "Find and return the next checkdoc message related error list, or nil.
Only text for error and `y-or-n-p' strings are checked.  See
`checkdoc-next-error' for details on the return value.
Argument ENABLE-FIX turns on the auto-fix feature.  This argument
assumes that the cursor is already positioned to perform the fix."
  (if enable-fix
      (checkdoc-message-text-engine)
    (let ((msg nil) (p (point)) (type nil)
	  (checkdoc-autofix-flag nil))
      (condition-case nil
	  (while (and (not msg)
		      (setq type
			    (checkdoc-message-text-next-string (point-max))))
	    (message "Searching for message string error...%d%%"
		     (floor (* 100.0 (point)) (point-max)))
	    (if (setq msg (checkdoc-message-text-engine type))
		(setq msg (cons msg (point)))))
	;; Quit.. restore position,  Other errors, leave alone
	(quit (goto-char p)))
      msg)))