From 093ffa5fbf7143f4668bb0a3dc9659a5cc836e12 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Sat, 17 Jun 2023 17:20:29 +1000 Subject: Moving things one level deeper To ease gnu stow usage. Now we can do stow -t ~ emacs --- emacs/.emacs.d/init/ycp-help.el | 114 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 emacs/.emacs.d/init/ycp-help.el (limited to 'emacs/.emacs.d/init/ycp-help.el') diff --git a/emacs/.emacs.d/init/ycp-help.el b/emacs/.emacs.d/init/ycp-help.el new file mode 100644 index 0000000..b699be9 --- /dev/null +++ b/emacs/.emacs.d/init/ycp-help.el @@ -0,0 +1,114 @@ +;;; ycp-help.el -- My configs for help -*- lexical-binding: t -*- + +;; Copyright (C) 2023 Free Software Foundation. + +;; Author: Yuchen Pei +;; Protesilaos Stavrou +;; Maintainer: Yuchen Pei +;; Package-Requires: ((emacs "28.2")) + +;; This file is part of dotfiles. + +;; dotfiles is free software: you can redistribute it and/or modify it under +;; the terms of the GNU Affero General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; dotfiles is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General +;; Public License for more details. + +;; You should have received a copy of the GNU Affero General Public +;; License along with dotfiles. If not, see . + +;;; Commentary: + +;; My configs for help. Covers help, man, woman, eldoc, info etc. + +;;; Code: + + +(my-package help-mode + (my-keybind help-mode-map + "x" #'describe-command + "v" #'describe-variable + "f" #'describe-function) + (setq help-window-select t) + (my-keybind global-map + "C-h h" nil + "C-h K" #'describe-keymap ; overrides `Info-goto-emacs-key-command-node' + "C-h c" #'describe-char ; overrides `describe-key-briefly' + "C-h D" #'shortdoc-display-group + ) + ) + +(my-package info + ;; TODO consider using `Info-additional-directory-list' instead + (add-to-list 'Info-directory-list (locate-user-emacs-file "info"))) + +(my-keybind global-map + "C-h C-f" #'find-function + "C-h C-l" #'find-library + "C-h C-v" #'find-variable + "C-h C-p" #'list-packages) +(my-setq-from-local find-function-C-source-directory) + +(my-package eldoc + (:delay 5) + (setq eldoc-echo-area-prefer-doc-buffer t) + ) + +(my-package man + (:delay 10) + (setq Man-notify-method 'pushy) + (require 'my-buffer) + (add-to-list 'my-buffer-create-functions + '(Man-mode . man))) + +(my-package woman + (:delay 10) + (require 'my-buffer) + (add-to-list 'my-buffer-create-functions + '(woman-mode . woman))) + +(my-package help-at-pt + (setq help-at-pt-timer-delay .2) + (setq help-at-pt-display-when-idle t) + (help-at-pt-set-timer)) + +(my-package my-help + (:delay 10) + (my-keybind global-map + "C-h M" #'my-woman-man + "C-h i" #'my-info-display-manual + "C-h ." #'my-describe-symbol-at-point + "\C-h!" #'my-external-command-open-source) + (my-keybind help-mode-map + "o" #'my-help-goto-symbol + "j" #'my-help-goto-symbol) + ) + +(my-configure + (:delay 10) + (add-to-list 'my-buffer-create-functions '(Info-mode . 'my-info-display-manual))) + +;;;; Tooltips (tooltip-mode) +(my-package tooltip + (:delay 15) + (setq tooltip-delay 0.5 + tooltip-short-delay 0.5 + x-gtk-use-system-tooltips nil + tooltip-frame-parameters + '((name . "tooltip") + (internal-border-width . 6) + (border-width . 0) + (no-special-glyphs . t))) + (autoload #'tooltip-mode "tooltip") + (tooltip-mode 1)) + +(my-package my-utils + (:delay 15) + (my-setq-from-local my-docs-root-dir)) + +(provide 'ycp-help) -- cgit v1.2.3