[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dtache c9f7c16d4d 3/3: Improve shell-command and compil
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dtache c9f7c16d4d 3/3: Improve shell-command and compile |
Date: |
Sat, 5 Feb 2022 09:57:27 -0500 (EST) |
branch: externals/dtache
commit c9f7c16d4d703c8890deea6a9c9b9d30e65e1737
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@posteo.net>
Improve shell-command and compile
Make it possible for others to use these commands as functions and
override the action and origin for the session.
---
dtache-compile.el | 5 +++--
dtache.el | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dtache-compile.el b/dtache-compile.el
index 11081e160a..63731d83f8 100644
--- a/dtache-compile.el
+++ b/dtache-compile.el
@@ -52,8 +52,9 @@ Optionally enable COMINT if prefix-argument is provided."
command))
(consp current-prefix-arg)))
(let* ((dtache-enabled t)
- (dtache-session-action dtache-compile-session-action)
- (dtache-session-origin 'compile)
+ (dtache-session-origin (or dtache-session-origin 'compile))
+ (dtache-session-action (or dtache-session-action
+ dtache-compile-session-action))
(dtache-session-mode 'create-and-attach))
(compile command comint)))
diff --git a/dtache.el b/dtache.el
index ccd37918c2..aabde2aa52 100644
--- a/dtache.el
+++ b/dtache.el
@@ -283,8 +283,9 @@ Optionally SUPPRESS-OUTPUT if prefix-argument is provided."
(car dtache-shell-command-history))
'dtache-shell-command-history)
current-prefix-arg))
- (let* ((dtache-session-origin 'shell-command)
- (dtache-session-action dtache-shell-command-session-action)
+ (let* ((dtache-session-origin (or dtache-session-origin 'shell-command))
+ (dtache-session-action (or dtache-session-action
+ dtache-shell-command-session-action))
(dtache--current-session (dtache-create-session command)))
(dtache-start-session command suppress-output)))