branch: externals/dtache
commit 2337bb132f132272cfc514b60fe83d544baea7f5
Author: Niklas Eklund <[email protected]>
Commit: Niklas Eklund <[email protected]>
Update mode symbols
create -> create-and-attach
new -> create
---
dtache-compile.el | 4 ++--
dtache-eshell.el | 4 ++--
dtache-shell.el | 6 +++---
dtache.el | 12 ++++++------
test/dtache-test.el | 2 +-
5 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/dtache-compile.el b/dtache-compile.el
index bbdcf77d17..96463b75bd 100644
--- a/dtache-compile.el
+++ b/dtache-compile.el
@@ -53,7 +53,7 @@ Optionally enable COMINT if prefix-argument is provided."
(let* ((dtache-enabled t)
(dtache-session-action dtache-compile-session-action)
(dtache-session-origin 'compile)
- (dtache-session-mode 'create))
+ (dtache-session-mode 'create-and-attach))
(compile command comint)))
;;;###autoload
@@ -64,7 +64,7 @@ Optionally EDIT-COMMAND."
(let* ((dtache-enabled t)
(dtache-session-action dtache-compile-session-action)
(dtache-session-origin 'compile)
- (dtache-session-mode 'create))
+ (dtache-session-mode 'create-and-attach))
(recompile edit-command)))
;;;;; Functions
diff --git a/dtache-eshell.el b/dtache-eshell.el
index 5163fadc1d..c7ab36dbf7 100644
--- a/dtache-eshell.el
+++ b/dtache-eshell.el
@@ -74,7 +74,7 @@
If prefix-argument directly DETACH from the session."
(interactive "P")
(let* ((dtache-session-origin 'eshell)
- (dtache-session-mode (if detach 'new 'create))
+ (dtache-session-mode (if detach 'create 'create-and-attach))
(dtache-enabled t)
(dtache--current-session nil))
(call-interactively #'eshell-send-input)))
@@ -108,7 +108,7 @@ If prefix-argument directly DETACH from the session."
(defun dtache-eshell--maybe-create-session ()
"Create a session if `dtache-eshell-command' value is t."
(when dtache-enabled
- (let* ((dtache-session-mode 'create)
+ (let* ((dtache-session-mode 'create-and-attach)
(dtache-session-action dtache-eshell-session-action)
(command (mapconcat #'identity
`(,eshell-last-command-name
diff --git a/dtache-shell.el b/dtache-shell.el
index 010b6387b1..5161068823 100644
--- a/dtache-shell.el
+++ b/dtache-shell.el
@@ -69,7 +69,7 @@
(interactive "P")
(let* ((dtache-session-origin 'shell)
(dtache-session-action dtache-shell-session-action)
- (dtache-session-mode (if detach 'new 'create))
+ (dtache-session-mode (if detach 'create 'create-and-attach))
(comint-input-sender #'dtache-shell--create-input-sender))
(comint-send-input)))
@@ -106,8 +106,8 @@ cluttering the comint-history with dtach commands."
(with-connection-local-variables
(let* ((command (substring-no-properties string))
(dtache-session-mode (if (dtache-attachable-command-p command)
- 'create
- 'new))
+ 'create-and-attach
+ 'create))
(dtach-command (dtache-dtach-command command t)))
(comint-simple-send proc dtach-command))))
diff --git a/dtache.el b/dtache.el
index 5f93778379..bfb1558618 100644
--- a/dtache.el
+++ b/dtache.el
@@ -511,13 +511,13 @@ Optionally SUPPRESS-OUTPUT."
(dtache-create-session command))))
(if-let ((run-in-background
(and (or suppress-output
- (eq dtache-session-mode 'new)
+ (eq dtache-session-mode 'create)
(not (dtache--session-attachable
dtache--current-session)))))
- (dtache-session-mode 'new))
+ (dtache-session-mode 'create))
(progn (setq dtache-enabled nil)
(apply #'start-file-process-shell-command
`("dtache" nil ,(dtache-dtach-command
dtache--current-session t))))
- (cl-letf* ((dtache-session-mode 'create)
+ (cl-letf* ((dtache-session-mode 'create-and-attach)
((symbol-function #'set-process-sentinel) #'ignore)
(buffer (generate-new-buffer-name
dtache--shell-command-buffer)))
(setq dtache-enabled nil)
@@ -657,7 +657,7 @@ Optionally CONCAT the command return command into a string."
Optionally CONCAT the command return command into a string."
(with-connection-local-variables
(let* ((dtache-session-mode (cond ((eq dtache-session-mode 'attach) 'attach)
- ((not (dtache--session-attachable
session)) 'new)
+ ((not (dtache--session-attachable
session)) 'create)
(t dtache-session-mode)))
(socket (dtache--session-file session 'socket t)))
(setq dtache--buffer-session session)
@@ -1006,8 +1006,8 @@ Optionally make the path LOCAL to host."
(defun dtache--dtach-arg ()
"Return dtach argument based on `dtache-session-mode'."
(pcase dtache-session-mode
- ('new "-n")
- ('create "-c")
+ ('create "-n")
+ ('create-and-attach "-c")
('attach "-a")
(_ "-n")))
diff --git a/test/dtache-test.el b/test/dtache-test.el
index 951ee9c7a4..8916fd9f79 100644
--- a/test/dtache-test.el
+++ b/test/dtache-test.el
@@ -73,7 +73,7 @@
((symbol-function #'dtache-create-session)
(lambda (_)
session)))
- (let* ((dtache-session-mode 'create)
+ (let* ((dtache-session-mode 'create-and-attach)
(expected `("-c" ,(dtache--session-file session 'socket t)
"-z" ,dtache-shell-program
"-c"