Mercurial > emacs
comparison lisp/emacs-lisp/checkdoc.el @ 23371:9808edcd3c95
(checkdoc-sentencespace-region-engine): Protect a `forward-sexp' call
which could fail, and improved regex for ie, and eg abbreviations.
author | Eric M. Ludlam <zappo@gnu.org> |
---|---|
date | Sun, 04 Oct 1998 12:37:28 +0000 |
parents | 1ea9db09a678 |
children | 6060f83b1ffc |
comparison
equal
deleted
inserted
replaced
23370:7addb1da4b2b | 23371:9808edcd3c95 |
---|---|
2024 (e (match-end 1))) | 2024 (e (match-end 1))) |
2025 (if (and (not (checkdoc-in-sample-code-p begin end)) | 2025 (if (and (not (checkdoc-in-sample-code-p begin end)) |
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? " |
2036 ". ") | 2039 ". ") |
2037 nil | 2040 nil |