[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9.8 gauche.interactive - Utilities for interactive session

Module: gauche.interactive

Provides useful utilities for the interactive session.

This module is automatically loaded when you run gosh interactively.

This module also sets autoloads for functions defined in gauche.reload module (see gauche.reload - Reloading modules), so that those functions can be used by default in interactive development.

Macro: apropos pattern &optional module

Show a list of defined variables whose name matches pattern. If you give a module or a module name module, only the variables defined in that module are listed. Without module, the variables "visible" from the current module are listed.

pattern may be a symbol or a regexp object. If it is a symbol, the variables whose name contains the substring that matches the symbol's name are listed. If it is a regexp object, the variables whose name matches the regexp are listed.

Some examples:

 
;; List variables that contains "string" in their name
(apropos 'string)

;; Search in srfi-14 module
(apropos 'char 'srfi-14)
Generic Function: describe obj
Generic Function: d obj

Prints the detail information about a Scheme object obj. The default method shows obj's class, and if it has any slots, the list of slot names and their values. You can specialize this method for customized display.

Function: info symbol

Displays a page of Gauche's info file that contains definition of the function or syntax specified by symbol. If an environment variable INFOPATH is defined, this function searches for the info file from the directories in it. Otherwise, this function guesses info file location from the gosh's library directory. If the info file can't be found, an error is signalled. If the info file is found, but symbol is not in its index, an error is signalled as well. So this function doesn't work if you haven't installed info file.

If the current output port is a tty, the info page is displayed by a paging software. If an environment variable PAGER is defined, it is used as a paging software. Otherwise, this function looks for less and more in this order from the directories in PATH. If none of them is found, or the output port is not a tty, this function just displays the page.

The first invocation of this function in a session takes some time to parse the info file.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated by Shiro Kawai on October, 7 2008 using texi2html 1.78.