aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric M. Ludlam1998-10-04 12:37:28 +0000
committerEric M. Ludlam1998-10-04 12:37:28 +0000
commit1a553b8be1276270cc0b78b516f93fc4300a6c11 (patch)
tree1f22a0b1f1a698acc1de9a906f644e0b0d4ca302
parent75c0d0950db65cbff76c5a00c00a1ac54a6b3404 (diff)
downloademacs-1a553b8be1276270cc0b78b516f93fc4300a6c11.tar.gz
emacs-1a553b8be1276270cc0b78b516f93fc4300a6c11.zip
(checkdoc-sentencespace-region-engine): Protect a `forward-sexp' call
which could fail, and improved regex for ie, and eg abbreviations.
-rw-r--r--lisp/emacs-lisp/checkdoc.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index 3d4e5957c38..5fd428a904a 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -2026,10 +2026,13 @@ If the offending word is in a piece of quoted text, then it is skipped."
2026 (not (checkdoc-in-example-string-p begin end)) 2026 (not (checkdoc-in-example-string-p begin end))
2027 (not (save-excursion 2027 (not (save-excursion
2028 (goto-char (match-beginning 1)) 2028 (goto-char (match-beginning 1))
2029 (forward-sexp -1) 2029 (condition-case nil
2030 ;; piece of an abbreviation 2030 (progn
2031 (looking-at "\\([a-z]\\|[ie]\\.?g\\)\\.") 2031 (forward-sexp -1)
2032 ))) 2032 ;; piece of an abbreviation
2033 (looking-at
2034 "\\([a-z]\\|[iI]\\.?e\\|[eE]\\.?g\\)\\."))
2035 (error t)))))
2033 (if (checkdoc-autofix-ask-replace 2036 (if (checkdoc-autofix-ask-replace
2034 b e 2037 b e
2035 "There should be two spaces after a period. Fix? " 2038 "There should be two spaces after a period. Fix? "