From bc6afc55e32fcd0591358a6b46db36d6d8f34779 Mon Sep 17 00:00:00 2001 From: Trey Peacock Date: Mon, 1 Apr 2024 21:11:57 -0700 Subject: [PATCH] add check for forward-sentence-function variable --- flymake-languagetool.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flymake-languagetool.el b/flymake-languagetool.el index fc0019e..31ca1c7 100644 --- a/flymake-languagetool.el +++ b/flymake-languagetool.el @@ -441,7 +441,10 @@ A positive ARG will return end point ARG number sentence following PT." (when pt (save-excursion (goto-char pt) - (funcall forward-sentence-function arg)))) + (funcall (or (and (boundp 'forward-sentence-function) + forward-sentence-function) + #'forward-sentence) + arg)))) (defun flymake-languagetool--setup () "Used to reset the checked state of the current buffer."