From 3e7250661d84027d10c00bc2262233262876af6b Mon Sep 17 00:00:00 2001 From: tastytea Date: Wed, 9 Oct 2019 20:41:04 +0200 Subject: [PATCH] Use woman for manpages in Emacs. --- init.el | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/init.el b/init.el index d436596..366fdb7 100644 --- a/init.el +++ b/init.el @@ -1,5 +1,5 @@ ;;; init.el --- tastytea's Emacs init file. -;; Time-stamp: <2019-10-08T16:15:13+00:00> +;; Time-stamp: <2019-10-09T18:39:58+00:00> ;;; Commentary: ;; Requires at least Emacs 24.3. @@ -610,14 +610,20 @@ With argument, do this that many times." ;;;;;;;;;;;;;;;;;;;; Misc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Manual pages. -(use-package man - :defer t - :custom-face - (Man-overstrike ((t (:inherit font-lock-type-face :bold t)))) - (Man-underline ((t (:inherit font-lock-keyword-face :underline t)))) +(use-package woman + :config + (defun my/woman-topic-at-point () + "Call woman and use the word at point as topic if it exists." + (interactive) + (let ((woman-use-topic-at-point t)) + (woman)) + ) + + ;; Open manpages in new window. + (setq display-buffer-alist '(("\\`\\*WoMan" display-buffer-pop-up-window))) :bind - ("" . man) - ("C-" . (lambda () (interactive) (manual-entry (current-word)))) + ("" . my/woman-topic-at-point) + ("C-" . woman) ) ;; Show directory tree in a window.