bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patch: Re: man.el should avoid "sh"


From: Alexander Pohoyda
Subject: Patch: Re: man.el should avoid "sh"
Date: Sun, 2 May 2004 13:57:04 +0200 (CEST)

Kevin Rodgers <ihs_4664@yahoo.com> writes:

> Max Polk wrote:
>  > Running emacs in Windows, by typing "M-x man ls" I get an error
>  > message that "sh" is not found.
>  >
>  > Here's a minor fix for man.el, line 618:
>  >
>  > -       (start-process manual-program buffer "sh" "-c"
>  > +       (start-process manual-program buffer shell-file-name "-c"
>  >
>  > This replaces the hard-coded "sh" with the variable shell-file-name.
>  > Notice that just below this shell-file-name is used and not "sh" so
>  > maybe it got fixed in one place but not the other.
> 
> You should also replace "-c" with shell-command-switch.

Thanks to Kevin and Max.

Here's a diff to install:

Index: man.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/man.el,v
retrieving revision 1.133
diff -u -r1.133 man.el
--- man.el      23 Mar 2004 07:33:39 -0000      1.133
+++ man.el      2 May 2004 11:46:55 -0000
@@ -732,11 +732,13 @@
        (setenv "GROFF_NO_SGR" "1")
        (if (fboundp 'start-process)
            (set-process-sentinel
-            (start-process manual-program buffer "sh" "-c"
+            (start-process manual-program buffer
+                           shell-file-name shell-command-switch
                            (format (Man-build-man-command) man-args))
             'Man-bgproc-sentinel)
          (let ((exit-status
-                (call-process shell-file-name nil (list buffer nil) nil "-c"
+                (call-process shell-file-name nil (list buffer nil) nil
+                              shell-command-switch
                               (format (Man-build-man-command) man-args)))
                (msg ""))
            (or (and (numberp exit-status)


And ChangeLog entry:

2004-05-02  Alexander Pohoyda  <alexander.pohoyda@gmx.net>  (tiny change)

        * man.el (Man-getpage-in-background): Use shell-file-name
        and shell-command-switch variables instead of hard-coded
        values.

 

-- 
Alexander Pohoyda <alexander.pohoyda@gmx.net>
PGP Key fingerprint: 7F C9 CC 5A 75 CD 89 72  15 54 5F 62 20 23 C6 44




reply via email to

[Prev in Thread] Current Thread [Next in Thread]