merge: pull request #5888 from ethan-leba/mac-woman
fix(default): only use `woman` on macOS
This commit is contained in:
commit
e92ce51c13
2 changed files with 15 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)))
|
||||
|
||||
|
|
|
@ -51,6 +51,16 @@
|
|||
(setq-local epa-file-encrypt-to (default-value 'epa-file-encrypt-to)))))
|
||||
|
||||
|
||||
(after! woman
|
||||
;; The woman-manpath default value does not necessarily match man. If we have
|
||||
;; man available but aren't using it for performance reasons, we can extract
|
||||
;; it's manpath.
|
||||
(when (executable-find "man")
|
||||
(setq woman-manpath
|
||||
(split-string (cdr (doom-call-process "man" "--path"))
|
||||
path-separator t))))
|
||||
|
||||
|
||||
(use-package! drag-stuff
|
||||
:defer t
|
||||
:init
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue