diff options
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/checkdoc.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index df93d392417..0862e66ac5d 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -2105,14 +2105,15 @@ Examples of recognized abbreviations: \"e.g.\", \"i.e.\", \"cf.\"." (save-excursion (goto-char begin) (condition-case nil - (let ((single-letter t)) + (let (single-letter) (forward-word -1) ;; Skip over all dots backwards, as `forward-word' will only ;; go one dot at a time in a string like "e.g.". (while (save-excursion (forward-char -1) (looking-at (rx "."))) - (setq single-letter nil) (forward-word -1)) + (when (= (point) (1- begin)) + (setq single-letter t)) ;; Piece of an abbreviation. (looking-at (if single-letter |