fix(default): only use woman
on macOS
`man -k "^"` is very slow on macOS. ``` sh-3.2$ time man -k "^" > /dev/null real 0m1.599s user 0m0.391s sys 0m1.209s ```
This commit is contained in:
parent
f458f97760
commit
6e0b2eafa6
1 changed files with 5 additions and 2 deletions
|
@ -18,10 +18,13 @@ If ARG (universal argument), runs `compile' from the current directory."
|
|||
|
||||
;;;###autoload
|
||||
(defun +default/man-or-woman ()
|
||||
"Invoke `man' if man is installed, otherwise use `woman'."
|
||||
"Invoke `man' if man is installed and the platform is not MacOS, otherwise use `woman'.
|
||||
|
||||
`man -k \"^\"` is very slow on MacOS, which is what `Man-completion-table' uses to
|
||||
generate `completing-read' candidates."
|
||||
(interactive)
|
||||
(call-interactively
|
||||
(if (executable-find "man")
|
||||
(if (and (not IS-MAC) (executable-find "man"))
|
||||
#'man
|
||||
#'woman)))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue