mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-09 15:50:40 -08:00
(checkdoc-eval-defun): Call eval-defun
interactively so that C-u M-C-x still does edebug. (checkdoc-sentencespace-region-engine): Don't force a double-space after `.' if it doesn't look like an end-of-sentence. (debug-ignored-errors): Add `disambiguate ...'.
This commit is contained in:
parent
3bd171d52c
commit
2e89869265
1 changed files with 30 additions and 29 deletions
|
|
@ -966,7 +966,7 @@ Evaluation is done first so the form will be read before the
|
||||||
documentation is checked. If there is a documentation error, then the display
|
documentation is checked. If there is a documentation error, then the display
|
||||||
of what was evaluated will be overwritten by the diagnostic message."
|
of what was evaluated will be overwritten by the diagnostic message."
|
||||||
(interactive)
|
(interactive)
|
||||||
(eval-defun nil)
|
(call-interactively 'eval-defun)
|
||||||
(checkdoc-defun))
|
(checkdoc-defun))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
|
|
@ -1654,7 +1654,7 @@ function,command,variable,option or symbol." ms1))))))
|
||||||
;; Require whitespace OR
|
;; Require whitespace OR
|
||||||
;; ITEMth<space> OR
|
;; ITEMth<space> OR
|
||||||
;; ITEMs<space>
|
;; ITEMs<space>
|
||||||
"\\(\\>\\|th\\>\\|s\\>\\)")
|
"\\(\\>\\|th\\>\\|s\\>\\|[.,;:]\\)")
|
||||||
e t)))
|
e t)))
|
||||||
(if (not found)
|
(if (not found)
|
||||||
(let ((case-fold-search t))
|
(let ((case-fold-search t))
|
||||||
|
|
@ -2004,35 +2004,35 @@ If the offending word is in a piece of quoted text, then it is skipped."
|
||||||
(progn
|
(progn
|
||||||
(set-syntax-table checkdoc-syntax-table)
|
(set-syntax-table checkdoc-syntax-table)
|
||||||
(goto-char begin)
|
(goto-char begin)
|
||||||
(while (re-search-forward "[^.0-9]\\(\\. \\)[^ \n]" end t)
|
(while (re-search-forward "[^ .0-9]\\(\\. \\)[^ \n]" end t)
|
||||||
(let ((b (match-beginning 1))
|
(let ((b (match-beginning 1))
|
||||||
(e (match-end 1)))
|
(e (match-end 1)))
|
||||||
(if (and (not (checkdoc-in-sample-code-p begin end))
|
(unless (or (checkdoc-in-sample-code-p begin end)
|
||||||
(not (checkdoc-in-example-string-p begin end))
|
(checkdoc-in-example-string-p begin end)
|
||||||
(not (save-excursion
|
(save-excursion
|
||||||
(goto-char (match-beginning 1))
|
(goto-char b)
|
||||||
(condition-case nil
|
(condition-case nil
|
||||||
(progn
|
(progn
|
||||||
(forward-sexp -1)
|
(forward-sexp -1)
|
||||||
;; piece of an abbreviation
|
;; piece of an abbreviation
|
||||||
(looking-at
|
(looking-at
|
||||||
"\\([a-z]\\|[iI]\\.?e\\|[eE]\\.?g\\)\\."))
|
"\\([a-z]\\|[iI]\\.?e\\|[eE]\\.?g\\)\\."))
|
||||||
(error t)))))
|
(error t))))
|
||||||
(if (checkdoc-autofix-ask-replace
|
(if (checkdoc-autofix-ask-replace
|
||||||
b e
|
b e
|
||||||
"There should be two spaces after a period. Fix? "
|
"There should be two spaces after a period. Fix? "
|
||||||
". ")
|
". ")
|
||||||
nil
|
nil
|
||||||
(if errtxt
|
(if errtxt
|
||||||
;; If there is already an error, then generate
|
;; If there is already an error, then generate
|
||||||
;; the warning output if applicable
|
;; the warning output if applicable
|
||||||
(if checkdoc-generate-compile-warnings-flag
|
(if checkdoc-generate-compile-warnings-flag
|
||||||
(checkdoc-create-error
|
(checkdoc-create-error
|
||||||
"There should be two spaces after a period"
|
"There should be two spaces after a period"
|
||||||
b e))
|
b e))
|
||||||
(setq errtxt
|
(setq errtxt
|
||||||
"There should be two spaces after a period"
|
"There should be two spaces after a period"
|
||||||
bb b be e)))))))
|
bb b be e)))))))
|
||||||
(set-syntax-table old-syntax-table))
|
(set-syntax-table old-syntax-table))
|
||||||
(if errtxt (checkdoc-create-error errtxt bb be))))))
|
(if errtxt (checkdoc-create-error errtxt bb be))))))
|
||||||
|
|
||||||
|
|
@ -2655,6 +2655,7 @@ function called to create the messages."
|
||||||
|
|
||||||
(add-to-list 'debug-ignored-errors
|
(add-to-list 'debug-ignored-errors
|
||||||
"Argument `.*' should appear (as .*) in the doc string")
|
"Argument `.*' should appear (as .*) in the doc string")
|
||||||
|
(add-to-list 'debug-ignored-errors "Disambiguate .* by preceding .*")
|
||||||
|
|
||||||
(provide 'checkdoc)
|
(provide 'checkdoc)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue