summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/checkdoc.el
diff options
context:
space:
mode:
authorEric M. Ludlam <zappo@gnu.org>1998-10-04 12:37:28 +0000
committerEric M. Ludlam <zappo@gnu.org>1998-10-04 12:37:28 +0000
commit1a553b8be1276270cc0b78b516f93fc4300a6c11 (patch)
tree1f22a0b1f1a698acc1de9a906f644e0b0d4ca302 /lisp/emacs-lisp/checkdoc.el
parent75c0d0950db65cbff76c5a00c00a1ac54a6b3404 (diff)
downloademacs-1a553b8be1276270cc0b78b516f93fc4300a6c11.tar.gz
(checkdoc-sentencespace-region-engine): Protect a `forward-sexp' call
which could fail, and improved regex for ie, and eg abbreviations.
Diffstat (limited to 'lisp/emacs-lisp/checkdoc.el')
-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."
(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? "