Fix recently introduced bug in checkdoc
* lisp/emacs-lisp/checkdoc.el (checkdoc-in-abbreviation-p): Fix recently introduced bug where some abbreviations weren't recognized. * test/lisp/emacs-lisp/checkdoc-tests.el (checkdoc-tests-in-abbrevation-p/basic-case): Extend test.
This commit is contained in:
parent
2ee5c80ff5
commit
f17fb37c51
2 changed files with 7 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue