branch: externals/agitate
commit e7b6acb8f7ef19ab3fb64b93014290f7806285f6
Author: Protesilaos Stavrou <i...@protesilaos.com>
Commit: Protesilaos Stavrou <i...@protesilaos.com>

    Limit agitate-diff-refine-cycle to diff-mode
---
 agitate.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/agitate.el b/agitate.el
index 8f83c663e9..bc92483cb3 100644
--- a/agitate.el
+++ b/agitate.el
@@ -55,7 +55,8 @@ none exists, the one closest to it.  On second call, operate 
on
 the entire buffer.  And on the third time, remove all word-wise
 fontification."
   (interactive nil diff-mode)
-  (let ((point (point)))
+  (when-let (((derived-mode-p 'diff-mode))
+             (point (point)))
     (pcase agitate--refine-diff-state
       ('current
        (setq-local diff-refine 'font-lock)

Reply via email to