diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-11-24 02:14:11 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-11-24 02:14:11 +0100 |
commit | d9e03e068d621cd8252ec15765d058be3ccd5f9d (patch) | |
tree | ccce0e6530f5af90b3ea2233374f331b44c706a7 /elisp/geiser-guile.el | |
parent | 992649e9e6f977943cbae191e3bc057a0393e7ad (diff) | |
download | geiser-chez-d9e03e068d621cd8252ec15765d058be3ccd5f9d.tar.gz geiser-chez-d9e03e068d621cd8252ec15765d058be3ccd5f9d.tar.bz2 |
Guile: button for texinfo lookup in doc browser
Diffstat (limited to 'elisp/geiser-guile.el')
-rw-r--r-- | elisp/geiser-guile.el | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/elisp/geiser-guile.el b/elisp/geiser-guile.el index 35548f3..fe32acd 100644 --- a/elisp/geiser-guile.el +++ b/elisp/geiser-guile.el @@ -20,6 +20,7 @@ (require 'geiser) (require 'compile) +(require 'info-look) ;;; Customization: @@ -92,6 +93,11 @@ effect on new REPLs. For existing ones, use the command :type '(repeat string) :group 'geiser-guile) +(geiser-custom--defcustom geiser-guile-manual-lookup-other-window-p nil + "Non-nil means pop up the Info buffer in another window." + :type 'boolean + :group 'geiser-guile) + ;;; REPL support: @@ -279,6 +285,26 @@ it spawn a server thread." (geiser-guile-update-warning-level)) +;;; Manual lookup +(info-lookup-add-help :topic 'symbol :mode 'geiser-guile-mode + :ignore-case nil + :regexp "[^()`',\" \n]+" + :doc-spec + '(("(r5rs)Index" nil "^[ ]+-+ [^:]+:[ ]*" "\\b") + ("(Guile)R5RS Index" nil "^ - [^:]+: " "\\b") + ("(Guile)Procedure Index" nil "^ - [^:]+: " "\\b") + ("(Guile)Variable Index" nil "^ - [^:]+: " "\\b"))) + +(defun guile--manual-look-up (id mod) + (let ((info-lookup-other-window-flag + geiser-guile-manual-lookup-other-window-p)) + (info-lookup-symbol id 'geiser-guile-mode)) + (when geiser-guile-manual-lookup-other-window-p + (switch-to-buffer-other-window "*info*")) + (search-forward (format "%s" id) nil t)) + + + ;;; Implementation definition: (define-geiser-implementation guile @@ -295,7 +321,7 @@ it spawn a server thread." (import-command geiser-guile--import-command) (find-symbol-begin geiser-guile--symbol-begin) (display-error geiser-guile--display-error) - (display-help) + (external-help guile--manual-look-up) (check-buffer geiser-guile--guess) (keywords geiser-guile--keywords)) |