* lisp/simple.el (shell-command): Kill buffer-local values of
`shell-file-name' and `shell-command-switch', there could be left
connection-local values. (Bug#76888)
(cherry picked from commit
37b8acf3781a65d397a946f621893b07a0960de0)
(with-current-buffer buffer
(shell-command-save-pos-or-erase)
(setq default-directory directory)
+ ;; There could be left connection-local values. (Bug#76888)
+ (kill-local-variable 'shell-file-name)
+ (kill-local-variable 'shell-command-switch)
(require 'shell)
(let ((process-environment
(append