diff --git a/modules/config/default/+bindings.el b/modules/config/default/+bindings.el index bdaed67c0..09d6deab7 100644 --- a/modules/config/default/+bindings.el +++ b/modules/config/default/+bindings.el @@ -617,6 +617,7 @@ :desc "Describe DOOM setting" :n "s" #'doom/describe-setting :desc "Describe variable" :n "v" #'describe-variable :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 "What face" :n "'" #'doom/what-face :desc "What minor modes" :n ";" #'doom/describe-active-minor-mode) diff --git a/modules/config/default/autoload/default.el b/modules/config/default/autoload/default.el index 738ea0a7b..52943b47e 100644 --- a/modules/config/default/autoload/default.el +++ b/modules/config/default/autoload/default.el @@ -68,3 +68,12 @@ If ARG (universal argument), runs `compile' from the current directory." (if arg #'projectile-compile-project #'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)))