Commit 1a553b8b authored by Eric M. Ludlam's avatar Eric M. Ludlam
Browse files

(checkdoc-sentencespace-region-engine): Protect a `forward-sexp' call

which could fail, and improved regex for ie, and eg abbreviations.
parent 75c0d095
......@@ -2026,10 +2026,13 @@ If the offending word is in a piece of quoted text, then it is skipped."
(not (checkdoc-in-example-string-p begin end))
(not (save-excursion
(goto-char (match-beginning 1))
(condition-case nil
(progn
(forward-sexp -1)
;; piece of an abbreviation
(looking-at "\\([a-z]\\|[ie]\\.?g\\)\\.")
)))
(looking-at
"\\([a-z]\\|[iI]\\.?e\\|[eE]\\.?g\\)\\."))
(error t)))))
(if (checkdoc-autofix-ask-replace
b e
"There should be two spaces after a period. Fix? "
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment