[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/eat 957fdb4a8f 1/2: Support Emacs 26.1
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/eat 957fdb4a8f 1/2: Support Emacs 26.1 |
Date: |
Sat, 7 Oct 2023 12:59:59 -0400 (EDT) |
branch: elpa/eat
commit 957fdb4a8fb6ff90a177661d0a759d01b5a72111
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>
Support Emacs 26.1
* eat.el: Depend on Emacs 26.1.
* eat.el (eat--t-handle-output, eat--handle-uic)
(eat--eshell-handle-uic): Don't use '(not CHAR)' form in 'rx'
forms.
* eat.el (eat--eshell-process-output-queue): Use
'combine-change-calls' if available.
* README.org: Update to reflect support for Emacs 26.
---
README.org | 10 +++++-----
eat.el | 32 ++++++++++++++++++--------------
2 files changed, 23 insertions(+), 19 deletions(-)
diff --git a/README.org b/README.org
index 4776af77a3..f038052237 100644
--- a/README.org
+++ b/README.org
@@ -98,15 +98,15 @@ be accessed with =C-h i m Eat=, also available
[[https://elpa.nongnu.org/nongnu-
* Installation
-Eat requires at least Emacs 27.1 or above.
+Eat requires at least Emacs 26.1 or above.
** NonGNU ELPA
Eat is available on NonGNU ELPA. So you can just do
=M-x package-install RET eat RET=.
-If you're on Emacs 27, you'll need to add NonGNU ELPA to your
-~package-archives~ by putting the following in your ~init.el~:
+If you're on Emacs 27 or earlier, you'll need to add NonGNU ELPA to
+your ~package-archives~ by putting the following in your ~init.el~:
#+begin_src emacs-lisp
(add-to-list 'package-archives
@@ -153,7 +153,7 @@ native-compiled Term even without byte-compilation, and
when Eat is
byte-compiled, Eat is more than three times fast. Also, Term
flickers, just try to run =emacs -nw= in it. It doesn't support
remote connections, for example over Tramp. However, it's builtin
-from the early days of Emacs, while Eat needs atleast Emacs 27.1.
+from the early days of Emacs, while Eat needs atleast Emacs 26.1.
** Vterm
@@ -161,7 +161,7 @@ Vterm is powered by a C library, libvterm. For this
reason, it can
process huge amount of text quickly. It is about 1.5 times faster
than Eat (byte-compiled or native-compiled) (and about 2.75 faster
then Eat without byte-compilation). But it doesn't have a char mode
-(however you can make a char mode spending some effort). And it too
+(however you can make a char mode by putting some effort). And it too
flickers like Term, so despite being much faster that Eat, it seems to
be slow. If you need your terminal to handle huge bursts (megabytes)
of data, you should use Vterm.
diff --git a/eat.el b/eat.el
index cd277b2497..e4c63e1b31 100644
--- a/eat.el
+++ b/eat.el
@@ -5,7 +5,7 @@
;; Author: Akib Azmain Turja <akib@disroot.org>
;; Created: 2022-08-15
;; Version: 0.8
-;; Package-Requires: ((emacs "27.1") (compat "29.1"))
+;; Package-Requires: ((emacs "29.1") (compat "29.1"))
;; Keywords: terminals processes
;; Homepage: https://codeberg.org/akib/emacs-eat
@@ -3694,7 +3694,7 @@ If NULLIFY is non-nil, nullify flushed part of Sixel
buffer."
;; OSC 5 2 ; <t> ; <s> ST.
((rx string-start "52;"
(let targets
- (zero-or-more (not ?\;)))
+ (zero-or-more (not (any ?\;))))
?\; (let data (zero-or-more anything))
string-end)
(eat--t-manipulate-selection
@@ -5362,7 +5362,7 @@ BUFFER is the terminal buffer."
;; more parameters.
;; UIC e ; A ; <t> ; <s> ST.
((rx string-start "e;A;"
- (let host (zero-or-more (not ?\;)))
+ (let host (zero-or-more (not (any ?\;))))
?\; (let path (zero-or-more anything))
string-end)
(eat--set-cwd-uic host path))
@@ -5395,14 +5395,14 @@ BUFFER is the terminal buffer."
(eat--set-cmd-status (string-to-number status)))
;; UIC e ; I ; 0 ; <t> ; <t> ; <t> ST.
((rx string-start "e;I;0;"
- (let format (zero-or-more (not ?\;)))
- ?\; (let host (zero-or-more (not ?\;)))
+ (let format (zero-or-more (not (any ?\;))))
+ ?\; (let host (zero-or-more (not (any ?\;))))
?\; (let path (zero-or-more anything))
string-end)
(eat--get-shell-history (cons host path) format))
;; UIC e ; I ; 1 ; <t> ; <t> ST.
((rx string-start "e;I;1;"
- (let format (zero-or-more (not ?\;)))
+ (let format (zero-or-more (not (any ?\;))))
?\; (let hist (zero-or-more anything))
string-end)
(eat--get-shell-history hist format))
@@ -7209,7 +7209,7 @@ PROGRAM can be a shell command."
(pcase cmd
;; UIC e ; A ; <t> ; <s> ST.
((rx string-start "e;A;"
- (let host (zero-or-more (not ?\;)))
+ (let host (zero-or-more (not (any ?\;))))
?\; (let path (zero-or-more anything))
string-end)
(eat--set-cwd-uic host path))
@@ -7335,12 +7335,15 @@ PROGRAM can be a shell command."
(setq eat--output-queue-first-chunk-time nil)
(let ((queue eat--pending-output-chunks))
(setq eat--pending-output-chunks nil)
- (combine-change-calls
- (eat-term-beginning eat-terminal)
- (eat-term-end eat-terminal)
- ;; TODO: Is `string-join' OK or should we use a loop?
- (eshell-output-filter
- process (string-join (nreverse queue))))))))
+ (if (< emacs-major-version 27)
+ (eshell-output-filter
+ process (string-join (nreverse queue)))
+ (combine-change-calls
+ (eat-term-beginning eat-terminal)
+ (eat-term-end eat-terminal)
+ ;; TODO: Is `string-join' OK or should we use a loop?
+ (eshell-output-filter
+ process (string-join (nreverse queue)))))))))
(defun eat--eshell-filter (process string)
"Process output STRING from PROCESS."
@@ -7499,6 +7502,8 @@ symbol `buffer', in which case the point of current
buffer is set."
"Update the current working directory."
(setq eat--eshell-invocation-directory default-directory))
+(defvar eshell-variable-aliases-list) ; In `esh-var'.
+
(define-minor-mode eat--eshell-local-mode
"Toggle Eat terminal emulation is Eshell."
:interactive nil
@@ -7553,7 +7558,6 @@ symbol `buffer', in which case the point of current
buffer is set."
(declare-function eshell-gather-process-output "esh-proc"
(command args))
-(defvar eshell-variable-aliases-list) ; In `esh-var'.
(defvar eshell-last-async-proc) ; In `esh-cmd'.
(defvar eshell-last-async-procs) ; In `esh-cmd'.