Subject: bug#75308: 30.0.93; man.el assume shell is bash

From: Michael Albinus <[email-masked]>
Date: Sun, 16 Feb 2025 09:33:56 +0100

Stefan Kangas <[email-masked]> writes:

Hi Stefan,

> Michael, could you please take a look at this bug?

Sorry, I've overlooked this bug report. The appended small patch fixes
it. Would it be OK to push to emacs-30?

Best regards, Michael.

diff --git a/lisp/man.el b/lisp/man.el
index 75f87feb8e8..dcfab8d2035 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -578,9 +578,9 @@ Man-default-directory

 (defun Man-shell-file-name ()
   "Return a proper shell file name, respecting remote directories."
-  (or ; This works also in the local case.
+  (if (connection-local-p shell-file-name)
       (connection-local-value shell-file-name)
-      "/bin/sh"))
+    "/bin/sh"))

 (defun Man-header-file-path ()
   "Return the C header file search path that Man should use.