]> git.eshelyaron.com Git - emacs.git/commitdiff
(checkdoc-sentencespace-region-engine): Protect a `forward-sexp' call
authorEric M. Ludlam <zappo@gnu.org>
Sun, 4 Oct 1998 12:37:28 +0000 (12:37 +0000)
committerEric M. Ludlam <zappo@gnu.org>
Sun, 4 Oct 1998 12:37:28 +0000 (12:37 +0000)
which could fail, and improved regex for ie, and eg abbreviations.

lisp/emacs-lisp/checkdoc.el

index 3d4e5957c3823c0946b48a9eaa60d96baab9f595..5fd428a904a8a84a1fa574dc03fc2f77793198d5 100644 (file)
@@ -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? "