emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 1684e6a 03/17: Avoid image-mode and doc-view-mode


From: Oleh Krehel
Subject: [elpa] master 1684e6a 03/17: Avoid image-mode and doc-view-mode
Date: Fri, 08 May 2015 13:42:06 +0000

branch: master
commit 1684e6af02c3dfcbe2dc27732a5787655d869d40
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    Avoid image-mode and doc-view-mode
    
    * avy-jump.el (avy--regex-candidates): Update.
    
    Re #1
---
 avy-jump.el |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/avy-jump.el b/avy-jump.el
index c76e266..5ad0ecd 100644
--- a/avy-jump.el
+++ b/avy-jump.el
@@ -129,16 +129,17 @@ When PRED is non-nil, it's a filter for matching point 
positions."
                      (window-list)
                    (list (selected-window))))
       (with-selected-window wnd
-        (let ((we (or end (window-end (selected-window) t))))
-          (save-excursion
-            (goto-char (or beg (window-start)))
-            (while (re-search-forward regex we t)
-              (unless (get-char-property (point) 'invisible)
-                (when (or (null pred)
-                          (funcall pred))
-                  (push (cons (cons (match-beginning 0)
-                                    (match-end 0))
-                              wnd) candidates))))))))
+        (unless (memq major-mode '(image-mode doc-view-mode))
+          (let ((we (or end (window-end (selected-window) t))))
+            (save-excursion
+              (goto-char (or beg (window-start)))
+              (while (re-search-forward regex we t)
+                (unless (get-char-property (point) 'invisible)
+                  (when (or (null pred)
+                            (funcall pred))
+                    (push (cons (cons (match-beginning 0)
+                                      (match-end 0))
+                                wnd) candidates)))))))))
     (nreverse candidates)))
 
 (defvar avy--overlay-offset 0



reply via email to

[Prev in Thread] Current Thread [Next in Thread]