[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master e5a18ef: Fix last change to shell-command
From: |
Basil L. Contovounesios |
Subject: |
master e5a18ef: Fix last change to shell-command |
Date: |
Sat, 5 Dec 2020 06:05:23 -0500 (EST) |
branch: master
commit e5a18efd3d96a942c6d6bdc04d0d431165f3138a
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Basil L. Contovounesios <contovob@tcd.ie>
Fix last change to shell-command
* lisp/simple.el: Specify comint-term-environment arglist in
function declaration.
(shell-command): Load shell.el before calling
comint-term-environment; otherwise it is undefined. Allow
async-shell-command-width to take precedence over the COLUMNS value
returned by comint-term-environment. (Bug#45034)
---
lisp/simple.el | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/lisp/simple.el b/lisp/simple.el
index 4356e40..d73bc6b 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3786,7 +3786,7 @@ a shell (with its need to quote arguments)."
(shell-command command output-buffer error-buffer))
(declare-function comint-output-filter "comint" (process string))
-(declare-function comint-term-environment "comint")
+(declare-function comint-term-environment "comint" ())
(defun shell-command (command &optional output-buffer error-buffer)
"Execute string COMMAND in inferior shell; display output, if any.
@@ -3965,18 +3965,19 @@ impose the use of a shell (with its need to quote
arguments)."
(with-current-buffer buffer
(shell-command-save-pos-or-erase)
(setq default-directory directory)
- (let ((process-environment
+ (require 'shell)
+ (let ((process-environment
(append
- (comint-term-environment)
(and (natnump async-shell-command-width)
(list
(format "COLUMNS=%d"
async-shell-command-width)))
+ (comint-term-environment)
process-environment)))
(setq proc
(start-process-shell-command "Shell" buffer command)))
(setq mode-line-process '(":%s"))
- (require 'shell) (shell-mode)
+ (shell-mode)
(set-process-sentinel proc #'shell-command-sentinel)
;; Use the comint filter for proper handling of
;; carriage motion (see comint-inhibit-carriage-motion).
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master e5a18ef: Fix last change to shell-command,
Basil L. Contovounesios <=