aboutsummaryrefslogtreecommitdiff
path: root/tests/testutil-ghostel-buffers.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-25 22:45:22 -0400
committerCraig Jennings <c@cjennings.net>2026-06-25 22:45:22 -0400
commitcbd38d881d723f04aab748740977916707f24034 (patch)
treeede1ff4d56489ce6acf4f188a2f091b4cb4dfa0c /tests/testutil-ghostel-buffers.el
parent0b74f6241a2d0736572f1e0653c1f96e89756f56 (diff)
downloaddotemacs-cbd38d881d723f04aab748740977916707f24034.tar.gz
dotemacs-cbd38d881d723f04aab748740977916707f24034.zip
refactor(term): F12 opens eshell-through-EAT, retire eshell-toggle and xterm-color
Point the F12 dock-and-remember toggle at eshell instead of a standalone EAT zsh shell, so the primary terminal is eshell running through EAT (eat-eshell-mode): elisp functions as commands, TRAMP transparency, and EAT rendering visual commands. Drop the eshell-toggle package and its C-<f12> binding, since F12 covers it now. Drop xterm-color from eshell, since EAT handles ANSI color natively and its TERM=xterm-256color fought EAT's own. The toggle's buffer predicate now matches eshell-mode; the toggle tests and fixture are updated.
Diffstat (limited to 'tests/testutil-ghostel-buffers.el')
-rw-r--r--tests/testutil-ghostel-buffers.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/testutil-ghostel-buffers.el b/tests/testutil-ghostel-buffers.el
index 3c8d75d00..8e26efec4 100644
--- a/tests/testutil-ghostel-buffers.el
+++ b/tests/testutil-ghostel-buffers.el
@@ -56,5 +56,15 @@ predicate without the side-effects of `(eat)'."
(setq-local major-mode 'eat-mode))
buf))
+(defun cj/test--make-fake-eshell-buffer (name)
+ "Return a buffer named NAME with `major-mode' set to `eshell-mode'.
+
+Avoids starting a real eshell by setting the mode buffer-locally. Used by the
+F12 toggle tests that need a buffer satisfying the eshell-mode predicate."
+ (let ((buf (get-buffer-create name)))
+ (with-current-buffer buf
+ (setq-local major-mode 'eshell-mode))
+ buf))
+
(provide 'testutil-ghostel-buffers)
;;; testutil-ghostel-buffers.el ends here