Bind SPC h w to +default/man-or-woman #639

Woman is essentially elisp-only Man; useful for systems without
man (Windows, particularly).
This commit is contained in:
Henrik Lissner 2018-06-01 12:13:56 +02:00
parent f1bf9d1632
commit 82f240ffc9
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 10 additions and 0 deletions

View file

@ -617,6 +617,7 @@
:desc "Describe DOOM setting" :n "s" #'doom/describe-setting :desc "Describe DOOM setting" :n "s" #'doom/describe-setting
:desc "Describe variable" :n "v" #'describe-variable :desc "Describe variable" :n "v" #'describe-variable
:desc "Print Doom version" :n "V" #'doom/version :desc "Print Doom version" :n "V" #'doom/version
:desc "Man pages" :n "w" #'+default/man-or-woman
:desc "Describe at point" :n "." #'helpful-at-point :desc "Describe at point" :n "." #'helpful-at-point
:desc "What face" :n "'" #'doom/what-face :desc "What face" :n "'" #'doom/what-face
:desc "What minor modes" :n ";" #'doom/describe-active-minor-mode) :desc "What minor modes" :n ";" #'doom/describe-active-minor-mode)

View file

@ -68,3 +68,12 @@ If ARG (universal argument), runs `compile' from the current directory."
(if arg (if arg
#'projectile-compile-project #'projectile-compile-project
#'compile)))) #'compile))))
;;;###autoload
(defun +default/man-or-woman ()
"Invoke `man' if man is installed, otherwise use `woman'."
(interactive)
(call-interactively
(if (executable-find "man")
#'man
#'woman)))