;;; -*- lexical-binding: t -*- ;; ;; this file: ;; https://dataswamp.org/~incal/emacs-init/info-incal.el (require 'close) (require 'info) (require 'scroll) (setq Info-use-header-line nil) (defun info-lookup-elisp-symbol (symbol) (interactive "Ssymbol: ") (info-lookup-symbol symbol 'emacs-lisp-mode)) (defun info-kill-ring-elisp-ref () (interactive) (Info-copy-current-node-name 0) ) (defun info-goto-top () (interactive) (Info-goto-node "(dir)Top") ) (defun info-find-source () (interactive) (let ((file (concat Info-current-file ".info"))) (if (file-exists-p file) (find-file-read-only file) (error "No file: %s (did you gunzip the info files?)" file) ))) ;; (setq Info-mode-hook nil) (defun Info-mode-hook-f () (let ((kmap Info-mode-map)) (set-scroll-keys kmap) (set-close-key kmap) (keymap-set kmap "c" #'info-find-source) (keymap-set kmap "s" #'info-kill-ring-elisp-ref) ;; history (keymap-set kmap "C-M-p" #'Info-history-back) (keymap-set kmap "C-M-n" #'Info-history-forward) ;; nodes (keymap-set kmap "p" #'Info-backward-node) (keymap-set kmap "j" #'Info-backward-node) (keymap-set kmap "n" #'Info-forward-node) (keymap-set kmap "l" #'Info-forward-node) (keymap-set kmap "P" #'Info-prev) (keymap-set kmap "N" #'Info-next) (keymap-set kmap "T" #'info-goto-top) )) (add-hook 'Info-mode-hook #'Info-mode-hook-f) (provide 'info-incal)