.emacs.d/init.d/misc/documentation.el

40 lines
1.2 KiB
EmacsLisp
Raw Normal View History

;;; documentation.el --- Tools to look up documentation -*- lexical-binding: t; -*-
;;; Commentary:
;;; Code:
(require 'basics/package-management)
;; Manual pages.
(use-package man
:custom (Man-width fill-column)
:custom-face
(Man-overstrike ((t (:inherit font-lock-type-face :bold t))))
(Man-underline ((t (:inherit font-lock-keyword-face :underline t))))
:bind ("<f1>" . man))
;; Manual pages, alternative implementation.
(use-package woman
:custom (woman-fill-frame t)
:config (progn
(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 ("C-<f1>" . my/woman-topic-at-point))
;; Read RFC documents.
(use-package rfc-mode
:commands (rfc-mode-browse)
:config (when (or (string= (system-name) "ventiloplattform")
(string= (system-name) "sprotznog"))
(customize-set-variable 'rfc-mode-directory "/var/rfc/")))
(provide 'misc/documentation)
;;; documentation.el ends here