fix(default): read correct manpath on MacOS
Versions of `man` shipped with the latest MacOS do not support the `--path` argument, which causes `M-x woman` in Emacs to break. However the `manpath` command gives the same information and exists on MacOS and Linux, at least the systems that I tested. Check for its existence, and if there is no `manpath` command then fall back to the logic that existed before. Fix: #7021
This commit is contained in:
parent
2853982447
commit
56b6169ae7
1 changed files with 10 additions and 5 deletions
|
@ -59,11 +59,16 @@
|
||||||
(after! woman
|
(after! woman
|
||||||
;; The woman-manpath default value does not necessarily match man. If we have
|
;; 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
|
;; man available but aren't using it for performance reasons, we can extract
|
||||||
;; it's manpath.
|
;; its manpath.
|
||||||
(when (executable-find "man")
|
(let ((manpath (cond
|
||||||
(setq woman-manpath
|
((executable-find "manpath")
|
||||||
(split-string (cdr (doom-call-process "man" "--path"))
|
(split-string (cdr (doom-call-process "manpath"))
|
||||||
path-separator t))))
|
path-separator t))
|
||||||
|
((executable-find "man")
|
||||||
|
(split-string (cdr (doom-call-process "man" "--path"))
|
||||||
|
path-separator t)))))
|
||||||
|
(when manpath
|
||||||
|
(setq woman-manpath manpath))))
|
||||||
|
|
||||||
|
|
||||||
(use-package! drag-stuff
|
(use-package! drag-stuff
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue