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

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

[elpa] externals/poke 3e5e2cbc4a 07/76: poke.el: improve layout of windo


From: ELPA Syncer
Subject: [elpa] externals/poke 3e5e2cbc4a 07/76: poke.el: improve layout of windows
Date: Tue, 5 Apr 2022 14:59:28 -0400 (EDT)

branch: externals/poke
commit 3e5e2cbc4a8a54b8620fbd4823e4c36e44748fa0
Author: Jose E. Marchesi <jose.marchesi@oracle.com>
Commit: Jose E. Marchesi <jose.marchesi@oracle.com>

    poke.el: improve layout of windows
    
    2022-03-12  Jose E. Marchesi  <jemarch@gnu.org>
    
            * emacs/poke.el (poke): Better window layout.
            (poke-out-iter-string): Quote face symbol.
---
 poke.el | 27 +++++++++++++++++----------
 1 file changed, 17 insertions(+), 10 deletions(-)

diff --git a/poke.el b/poke.el
index f2db000573..63112a3d9f 100644
--- a/poke.el
+++ b/poke.el
@@ -126,7 +126,7 @@
 (defvar poke-out-styles nil)
 (defvar poke-out-emitted-iter-string nil)
 (defvar poke-out-iter-string
-  (propertize (char-to-string 8594) 'font-lock-face poke-iter-string-face))
+  (propertize (char-to-string 8594) 'font-lock-face 'poke-iter-string-face))
 
 (defconst poke-out-state-waiting-for-length 0)
 (defconst poke-out-state-waiting-for-msg 1)
@@ -533,11 +533,14 @@ Commands:
   (poke-out)
   (poke-cmd)
   (poke-code)
-  (setq poke-repl-seq 0)
-  (let ((buf (get-buffer-create "*poke-repl*")))
-    (with-current-buffer  buf
-      (insert "Welcome to GNU poke.\n")
-      (poke-repl-mode))))
+  (when (not (process-live-p poke-repl-process))
+    (setq poke-repl-seq 0)
+    (let ((buf (get-buffer-create "*poke-repl*")))
+      (with-current-buffer  buf
+        (insert "Welcome to GNU poke.\n")
+        (poke-repl-mode))))
+  (when (called-interactively-p)
+    (switch-to-buffer-other-window "*poke-repl*")))
 
 ;;;; Main interface
 
@@ -569,10 +572,14 @@ Commands:
   (when (not (process-live-p poke-poked-process))
     (poke-poked)
     (sit-for 0.2))
-  (when (not (process-live-p poke-repl-process))
-    (poke-repl))
-  (switch-to-buffer "*poke-out*")
-  (switch-to-buffer-other-window "*poke-repl*"))
+  (poke-repl)
+  (poke-vu)
+  (delete-other-windows)
+  (switch-to-buffer "*poke-repl*")
+  (let ((repl-window (get-buffer-window (current-buffer))))
+    (switch-to-buffer-other-window "*poke-vu*")
+    (switch-to-buffer-other-window "*poke-out*")
+    (select-window repl-window)))
 
 (defun poke-exit ()
   (interactive)



reply via email to

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