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

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

[elpa] master 54074c7 65/78: avy.el (avy-all-windows-alt): New defcustom


From: Oleh Krehel
Subject: [elpa] master 54074c7 65/78: avy.el (avy-all-windows-alt): New defcustom
Date: Sat, 23 Jan 2016 14:00:20 +0000

branch: master
commit 54074c764d22a698112f23a4e58a765b3f2fecb6
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    avy.el (avy-all-windows-alt): New defcustom
    
    * avy.el (avy-dowindows): Use `avy-all-windows-alt'.
    (avy--regex-candidates):
    (avy--read-candidates): Use `current-prefix-arg'. At some later point, it
    could be passed as an argument instead.
    
    Fixes #118
---
 avy.el |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/avy.el b/avy.el
index 412d9b2..524c127 100644
--- a/avy.el
+++ b/avy.el
@@ -432,12 +432,18 @@ multiple DISPLAY-FN invokations."
         (t
          (error "Unrecognized option: %S" avy-all-windows))))
 
+(defcustom avy-all-windows-alt t
+  "The alternative `avy-all-windows' for use with \\[universal-argument]."
+  :type '(choice
+          (const :tag "All windows on the current frame" t)
+          (const :tag "All windows on all frames" all-frames)))
+
 (defmacro avy-dowindows (flip &rest body)
   "Depending on FLIP and `avy-all-windows' run BODY in each or selected 
window."
   (declare (indent 1)
            (debug (form body)))
   `(let ((avy-all-windows (if ,flip
-                              (not avy-all-windows)
+                              avy-all-windows-alt
                             avy-all-windows)))
      (dolist (wnd (avy-window-list))
        (with-selected-window wnd
@@ -591,7 +597,7 @@ When GROUP is non-nil, (BEG . END) should delimit that 
regex group."
   (let ((case-fold-search (or avy-case-fold-search
                               (not (string= regex (upcase regex)))))
         candidates)
-    (avy-dowindows nil
+    (avy-dowindows current-prefix-arg
       (dolist (pair (avy--find-visible-regions
                      (or beg (window-start))
                      (or end (window-end (selected-window) t))))
@@ -1208,7 +1214,7 @@ This function obeys `avy-all-windows' setting."
              ;; Highlight
              (when (>= (length str) 1)
                (let (found)
-                 (avy-dowindows nil
+                 (avy-dowindows current-prefix-arg
                    (dolist (pair (avy--find-visible-regions
                                   (window-start)
                                   (window-end (selected-window) t)))



reply via email to

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