(require 'super) (require 'man) (require 'scroll) (require 'close) (require 'buc) (require 'revert-buffer-my) ;; roff: ~/.emacs.d/emacs-init/ide/ide.el (setq Man-notify-method 'pushy) (defun man-suggest () (interactive) (navigate-buffer-category "*Man " #'switch-to-type "Man " 'man) ) (defun man-find-source () (interactive) (let*((Man-argument-list (split-string Man-arguments)) (section-or-name (car Man-argument-list)) (section (if (numberp section-or-name) section-or-name 1)) (name (car (last Man-argument-list))) (filename (substring (shell-command-to-string (format "whereis -m %s.%s | cut -d' ' -f 2" name section) ) 0 -1) )) (find-file filename) )) (let ((the-map Man-mode-map)) (disable-super-global-keys the-map) (define-key the-map "r" #'Man-update-manpage) (define-key the-map ";" #'man-find-source) (define-key the-map "\C-o;" #'man-find-source) (set-bury-keys the-map) (set-scroll-keys the-map t) )