]> git.eshelyaron.com Git - emacs.git/commitdiff
Respect 'manual-program' variable
authorStefan Kangas <stefankangas@gmail.com>
Thu, 2 Jan 2025 19:19:24 +0000 (20:19 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sat, 4 Jan 2025 20:55:12 +0000 (21:55 +0100)
* lisp/man.el (Man-man-k-flags): Respect 'manual-program'
variable.

(cherry picked from commit ca79916179ffb5ddc801e1ccb12c5ff72f6516d8)

lisp/man.el

index a73159d40ceb5bc3c7f2bf11aa8d3f2d388adff2..da702e79815acd8b00f067e4dccde043043f9204 100644 (file)
@@ -977,14 +977,15 @@ foo(sec)[, bar(sec) [, ...]] [other stuff] - description"
   ;; seems like the safest choice, but `man -k apropos' seems almost as safe
   ;; and usually returns a much shorter output.
   (with-temp-buffer
-    (with-demoted-errors "%S" (call-process "man" nil t nil "-k" "apropos"))
+    (with-demoted-errors "%S"
+      (call-process manual-program nil t nil "-k" "apropos"))
     (let ((lines (count-lines (point-min) (point-max)))
           (completions (Man-parse-man-k)))
       (if (>= (length completions) lines)
           '("-k") ;; "-k" seems to return sane results: look no further!
         (erase-buffer)
         ;; Try "-k -l" (bug#73656).
-        (with-demoted-errors "%S" (call-process "man" nil t nil
+        (with-demoted-errors "%S" (call-process manual-program nil t nil
                                                 "-k" "-l" "apropos"))
         (let ((lines (count-lines (point-min) (point-max)))
               (completions (Man-parse-man-k)))