Use woman for manpages in Emacs.

This commit is contained in:
tastytea 2019-10-09 20:41:04 +02:00
parent 6ff34a0518
commit 3e7250661d
1 changed files with 14 additions and 8 deletions

22
init.el
View File

@ -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
("<f1>" . man)
("C-<f1>" . (lambda () (interactive) (manual-entry (current-word))))
("<f1>" . my/woman-topic-at-point)
("C-<f1>" . woman)
)
;; Show directory tree in a window.