Variable: Man-man-k-flags
Man-man-k-flags is a variable defined in man.el.gz.
Value
("-k")
Documentation
List of arguments to pass to get the expected "man -k" output.
Source Code
;; Defined in /usr/src/emacs/lisp/man.el.gz
(defvar Man-man-k-flags
;; It's not clear which man page will "always" be available, `man -k man'
;; 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 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 manual-program nil t nil
"-k" "-l" "apropos"))
(let ((lines (count-lines (point-min) (point-max)))
(completions (Man-parse-man-k)))
(if (and (> lines 0) (>= (length completions) lines))
'("-k" "-l") ;; "-k -l" seems to return sane results.
'("-k"))))))
"List of arguments to pass to get the expected \"man -k\" output.")