~pkal/shell-command-plus

63556f6b37807fa338554faf61ebc1d720bcdc2e — Philip Kaludercic a month ago dcbda4c
Check if shell-command-buffer-name is bound

This variable was introduced in Emacs 28 and is not bound in older
versions.
1 files changed, 2 insertions(+), 1 deletions(-)

M shell-command+.el
M shell-command+.el => shell-command+.el +2 -1
@@ 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)