From ef9602052894e97f8bd8abba7306169caf5c5ee8 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Wed, 13 Aug 2025 12:00:44 -0500 Subject: splitting help into config (internal) and utils (added packages) --- modules/help-config.el | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 modules/help-config.el (limited to 'modules/help-config.el') diff --git a/modules/help-config.el b/modules/help-config.el new file mode 100644 index 000000000..2dde38b28 --- /dev/null +++ b/modules/help-config.el @@ -0,0 +1,63 @@ +;;; help-config --- Help Functionality Configuration -*- lexical-binding: t; -*- +;; author Craig Jennings + +;;; Commentary: + +;;; Code: + + +(setq help-window-select t) ;; Always select the help buffer in a separate window + +(global-set-key (kbd "C-h P") 'list-packages) ;; bring up the package menu + +;; ---------------------------------- Helpful ---------------------------------- + +(use-package helpful + :defer .5 + :bind + ("C-h f" . helpful-callable) + ("C-h v" . helpful-variable) + ("C-h k" . helpful-key) + ("C-h F" . helpful-function) + ("C-h C" . helpful-command) + ("C-h ." . helpful-at-point) + ("C-h o" . helpful-symbol) ;; overrides 'describe-symbol' keybinding + :config + (setq counsel-describe-function-function #'helpful-callable) + (setq counsel-describe-variable-function #'helpful-variable)) + + +;; ------------------------------------ Man ------------------------------------ + +(use-package man + :defer 1 + :ensure nil ;; built-in + :bind ("C-h M" . man)) + + +;; ------------------------------------ Info ----------------------------------- + +(use-package info + :defer 1 + :ensure nil ;; built-in + :bind + (:map Info-mode-map + ("m" . bookmark-set) ;; note:overrides menu selection + ("M" . Info-menu)) ;; so menu selection goes here + :preface + (defun open-with-info-mode () + (interactive) + (let ((file-name (buffer-file-name))) + (kill-buffer (current-buffer)) + (info file-name))) + :hook + (info-mode . info-persist-history-mode) + :init + ;; add personal info files in emacs config assets directory + ;; BUG: This causes an error on launch + (push (concat user-emacs-directory "assets/info") Info-directory-list) + (add-to-list 'auto-mode-alist '("\\.info\\'" . open-with-info-mode))) + + +(provide 'help-config) +;;; help-utils.el ends here -- cgit v1.2.3