[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] poke.el: update protocol in `poke-vu-handle-cmd'
From: |
Jose E. Marchesi |
Subject: |
Re: [PATCH] poke.el: update protocol in `poke-vu-handle-cmd' |
Date: |
Thu, 19 Jan 2023 00:04:36 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hi Mohammad.
Thanks for the patch.
OK for master.
> ---
>
> Hello Jose.
>
> I'm using my last chance to clean things up :)
> This patch only change the value of vu commands.
>
> Regards,
> Mohammad-Reza
>
>
> poke.el | 26 +++++++++++++-------------
> 1 file changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/poke.el b/poke.el
> index b8dd85f..11866d4 100644
> --- a/poke.el
> +++ b/poke.el
> @@ -439,16 +439,9 @@ following attributes in its alist:
>
> (defun poke-vu-handle-cmd (proc cmd data)
> (pcase cmd
> - (1 ;; CLEAR
> - (when (buffer-live-p (process-buffer proc))
> - (with-current-buffer (process-buffer proc)
> - (let ((inhibit-read-only t))
> - (setq-local poke-vu-cur-pos (point))
> - (delete-region (point-min) (point-max))))))
> - (2 ;; APPEND
> - (process-put proc 'poke-vu-output
> - (concat (process-get proc 'poke-vu-output) data)))
> - (5 ;; FINISH
> + (1 ;; ITER_BEGIN
> + )
> + (2 ;; ITER_END
> (when (buffer-live-p (process-buffer proc))
> (with-current-buffer (process-buffer proc)
> (let* ((inhibit-read-only t)
> @@ -462,9 +455,16 @@ following attributes in its alist:
> (when offset
> (poke-vu-goto-byte offset))))))
> (process-put proc 'poke-vu-output ""))
> - (3 ;; HIGHLIGHT
> - )
> - (4 ;; FILTER
> + (3 ;; CLEAR
> + (when (buffer-live-p (process-buffer proc))
> + (with-current-buffer (process-buffer proc)
> + (let ((inhibit-read-only t))
> + (setq-local poke-vu-cur-pos (point))
> + (delete-region (point-min) (point-max))))))
> + (4 ;; APPEND
> + (process-put proc 'poke-vu-output
> + (concat (process-get proc 'poke-vu-output) data)))
> + (5 ;; HIGHLIGHT
> )
> (_ ;; Protocol error
> (process-put proc 'pokelet-buf "")