Skip to content

Commit

Permalink
#49 Check the last letter of the preceding word for adoc-flyspell-ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Zawada authored and Tobias Zawada committed Feb 8, 2024
1 parent d757c1f commit 7f51cc8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion adoc-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -3794,7 +3794,9 @@ Turning on Adoc mode runs the normal hook `adoc-mode-hook'."
"Function for `flyspell-mode-predicate' property of `adoc-mode'.
Returns t if word at point should be checked, nil otherwise."
(font-lock-ensure (line-beginning-position) (line-end-position))
(null (get-text-property (point) 'adoc-flyspell-ignore)))
(null (get-text-property
(1- (point)) ;; preceding word is checked, so 1- should do no harm
'adoc-flyspell-ignore)))

(put 'adoc-mode 'flyspell-mode-predicate 'adoc-flyspell-p)

Expand Down

0 comments on commit 7f51cc8

Please sign in to comment.