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

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

[elpa] master d6ed99f 09/68: ace-window.el: remove "emacs --deamon"'s in


From: Oleh Krehel
Subject: [elpa] master d6ed99f 09/68: ace-window.el: remove "emacs --deamon"'s invisible frame
Date: Sat, 21 Mar 2015 19:06:49 +0000

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

    ace-window.el: remove "emacs --deamon"'s invisible frame
    
    * ace-window.el (aw-list-visual-area): New function.
      (aw-generic): Use `aw-list-visual-area'.
    
    Fixes #4.
---
 ace-window.el |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/ace-window.el b/ace-window.el
index 13fca2c..9ac2591 100644
--- a/ace-window.el
+++ b/ace-window.el
@@ -65,8 +65,19 @@
   "The scope used by `ace-window'."
   :group 'ace-window
   :type '(choice
-         (const :tag "global" global)
-         (const :tag "frame" frame)))
+          (const :tag "global" global)
+          (const :tag "frame" frame)))
+
+(defun aw-list-visual-area ()
+  "Forward to `ace-jump-list-visual-area', removing invisible frames."
+  (cl-remove-if
+   (lambda (x)
+     (let ((f (aj-visual-area-frame x)))
+       (or (not (and (frame-live-p f)
+                     (frame-visible-p f)))
+           (and (= (frame-height f) 10)
+                (= (frame-width f) 10)))))
+   (ace-jump-list-visual-area)))
 
 ;; ——— Macros 
——————————————————————————————————————————————————————————————————
 ;;;###autoload
@@ -120,7 +131,7 @@ HANDLER is a function that takes a window argument."
        (interactive)
        (let* ((ace-jump-mode-scope aw-scope)
               (visual-area-list
-               (sort (ace-jump-list-visual-area)
+               (sort (aw-list-visual-area)
                      'aw-visual-area<)))
          (cl-case (length visual-area-list)
            (0)



reply via email to

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