1. Yaron Minsky
  2. js-elisp


seanmcl  committed 2ae30ef

window-selection work

  • Participants
  • Parent commits 83f9941
  • Branches default

Comments (0)

Files changed (1)

File omake.el

View file
               (null Omake.Window.Error)
               (nequal Omake.Window.Code Omake.Window.Error))))
+(defmacro Omake.Frame.uniconify1 (w f)
+  `(progn
+     (Omake.check-dedicated)
+     (make-frame-visible ,f)
+     (when ,w (make-frame-visible (window-frame ,w)))))
+(defun Omake.Frame.uniconify (kind)
+  (case kind
+    ('error (Omake.Frame.uniconify1 Omake.Window.Error Omake.Frame.Error))
+    ('code (Omake.Frame.uniconify1 Omake.Window.Code Omake.Frame.Code))
+    (t (error "Impossible"))))
 (defun Omake.Window.get (kind)
   (assert (Omake.Window.kindp kind))
   (case kind
 (defun Omake.next-error (&optional user-num)
   (interactive "P")
-  (make-frame-visible Omake.Frame.Error)
+  ;; We'll definitely show the error window, so uniconify the error frame if it exists
+  (Omake.Frame.uniconify 'error)
   (let* ((model (Omake.Model.current))
          (result (Omake.model-result model))
          (status (Omake.model-status model))
                  (n (mod user-num num-errors))
                  (_ (assert (< n num-errors)))
                  (e (Omake.Ring.nth ring n)))
-            (make-frame-visible Omake.Frame.Code)
+            ;; Make sure the code frame is visible
+            (Omake.Frame.uniconify 'code)
             (Omake.Error.eval e)
             (message "There are errors")))))))