;;; -*- lexical-binding: t -*- ;;; ;;; this file: ;;; http://user.it.uu.se/~embe8573/emacs-init/my-info.el ;;; https://dataswamp.org/~incal/emacs-init/my-info.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 ((the-map Info-mode-map)) (set-scroll-keys the-map) (set-close-key the-map) ;; misc (define-key the-map "c" #'info-find-source) (define-key the-map "s" #'info-kill-ring-elisp-ref) ;; history (define-key the-map "\C-\M-p" #'Info-history-back) (define-key the-map "\C-\M-n" #'Info-history-forward) ;; nodes (define-key the-map "b" #'Info-backward-node) (define-key the-map "j" #'Info-backward-node) (define-key the-map "l" #'Info-forward-node) (define-key the-map "T" #'info-goto-top) )) (add-hook 'Info-mode-hook #'Info-mode-hook-f)