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 | 3618844e887e3f7388e07f9b77f033f414d76bfd (patch) | |
tree | 24531718af69e629a0877b338247bb326f031fc4 /elisp/geiser-guile.el | |
parent | e25e31f2f838c0e00f1c786c50c933e983998115 (diff) | |
download | geiser-guile-3618844e887e3f7388e07f9b77f033f414d76bfd.tar.gz geiser-guile-3618844e887e3f7388e07f9b77f033f414d76bfd.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)) |