[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/shell-command+ 63556f6 1/2: Check if shell-command-buff
From: |
ELPA Syncer |
Subject: |
[elpa] externals/shell-command+ 63556f6 1/2: Check if shell-command-buffer-name is bound |
Date: |
Wed, 20 Oct 2021 15:57:28 -0400 (EDT) |
branch: externals/shell-command+
commit 63556f6b37807fa338554faf61ebc1d720bcdc2e
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Check if shell-command-buffer-name is bound
This variable was introduced in Emacs 28 and is not bound in older
versions.
---
shell-command+.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/shell-command+.el b/shell-command+.el
index a309f35..09a39ef 100644
--- a/shell-command+.el
+++ b/shell-command+.el
@@ -361,7 +361,8 @@ between BEG and END. Otherwise the whole buffer is
processed."
(default-directory (shell-command+-expand-path (or path "."))))
;; Make sure the previous output buffer was killed, to prevent
;; TRAMP paths from persisting between commands.
- (let ((shell-command-buffer (get-buffer shell-command-buffer-name)))
+ (let ((shell-command-buffer (get-buffer (or (bound-and-true-p
shell-command-buffer-name)
+ "*Shell Command Output*"))))
(when shell-command-buffer
(kill-buffer shell-command-buffer)))
(cond ((eq mode 'input)