From 56671f6b05dc9a4a596a7ed8823ecadcf5b05cb2 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sat, 14 Feb 2009 20:52:27 +0100 Subject: New command to get docstrings (C-cC-d). --- geiser/emacs.scm | 3 ++- geiser/introspection.scm | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'geiser') diff --git a/geiser/emacs.scm b/geiser/emacs.scm index 79da237..1458c73 100644 --- a/geiser/emacs.scm +++ b/geiser/emacs.scm @@ -29,7 +29,8 @@ ge:completions ge:symbol-location ge:compile-file - ge:load-file) + ge:load-file + ge:docstring) #:use-module ((geiser introspection) :renamer (symbol-prefix-proc 'ge:)) #:use-module ((geiser eval) diff --git a/geiser/introspection.scm b/geiser/introspection.scm index cd48740..14cd021 100644 --- a/geiser/introspection.scm +++ b/geiser/introspection.scm @@ -28,6 +28,7 @@ #:export (arguments completions symbol-location docstring) #:use-module (system vm program) #:use-module (ice-9 session) + #:use-module (ice-9 documentation) #:use-module (srfi srfi-1)) (define (arguments sym . syms) @@ -118,4 +119,8 @@ (define (make-location-from-module-name name) (make-location (module-filename name) #f)) + +(define (docstring sym) + (object-documentation (symbol->obj sym))) + ;;; introspection.scm ends here -- cgit v1.2.3