which could fail, and improved regex for ie, and eg abbreviations.
(not (checkdoc-in-example-string-p begin end))
(not (save-excursion
(goto-char (match-beginning 1))
- (forward-sexp -1)
- ;; piece of an abbreviation
- (looking-at "\\([a-z]\\|[ie]\\.?g\\)\\.")
- )))
+ (condition-case nil
+ (progn
+ (forward-sexp -1)
+ ;; piece of an abbreviation
+ (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? "