branch: externals/poke
commit d9e55b8d64b098d31e5e04dbdd1dd3fae41347d7
Author: Jose E. Marchesi <[email protected]>
Commit: Jose E. Marchesi <[email protected]>

    poke.el: several fixes
    
    2022-03-12  Jose E. Marchesi  <[email protected]>
    
            * emacs/poke.el (poke-styling-faces): Fix faces names.
            (poke-out-filter): Move proces marker whenever necessary.
            (poke-open-file): s/E_generic_io/E-io.
---
 poke.el | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/poke.el b/poke.el
index 6b3e5bab43..eb6584c0cd 100644
--- a/poke.el
+++ b/poke.el
@@ -88,8 +88,8 @@
     ("offset" poke-offset-face)
     ("struct-field-name" poke-struct-field-name-face)
     ("diff-thunk-header"  poke-diff-thunk-header-face)
-    ("diff-minus" poke-diff-minus)
-    ("diff-plus" poke-diff-plus)))
+    ("diff-minus" poke-diff-minus-face)
+    ("diff-plus" poke-diff-plus-face)))
 
 ;;;; poked
 
@@ -174,10 +174,13 @@
                           (substring poke-out-buf 1 (- poke-out-length 1)))))
              (when (buffer-live-p (process-buffer proc))
                (with-current-buffer (process-buffer proc)
-                 (let ((buffer-read-only nil))
-                   (goto-char (point-max))
-                   (insert output)
-                   (set-marker (process-mark proc) (point)))))))
+                 (let ((moving (= (point) (process-mark proc))))
+                   (save-excursion
+                     (let ((buffer-read-only nil))
+                       (goto-char (process-mark proc))
+                       (insert output)
+                       (set-marker (process-mark proc) (point))))
+                   (if moving (goto-char (process-mark proc))))))))
           (6 ;; Process eval poke output
            (let ((output (poke-out-stylize
                           (substring poke-out-buf 1 (- poke-out-length 1)))))
@@ -533,7 +536,7 @@ Commands:
   (interactive "fFile to open: ")
   ;; XXX: quote filename if needed
   (poke-code-send
-   (concat "{ set_ios (open (\"" filename "\")); } ?! E_generic_io")))
+   (concat "{ set_ios (open (\"" filename "\")); } ?! E_io;")))
 
 (defun poke-load-file (filename)
   (interactive "fPickle to load: ")

Reply via email to