Common Lisp Package: COM.INFORMATIMAGO.COMMON-LISP.INTERACTIVE.INTERACTIVE

This package defines various interactive commands intended to be used at the REPL. It also re-exports some functions from BROWSER and PACKAGE. License: AGPL3 Copyright Pascal J. Bourguignon 2006 - 2012 This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>

README:

FUNCTION

Public

BROWSE

COMMAND DO: Displays the contents of the working directory and allows the user to navigate in the directory tree and to load files.

CAT (&REST PATHS)

COMMAND SEE: MORE DO: Same as more, but force no pagination.

CD (&OPTIONAL PATH)

COMMAND DO: Change the working directory. ARGUMENTS: The path of the new working directory. If not given, then change to the user home directory.

COMPARE-PATHNAMES (P1 P2)

DO: Compare the pathnames P1 and P2 component by component, reporting their differences on the *standard-output*.

DATE (&OPTIONAL (DATE (GET-UNIVERSAL-TIME)))

Prints the date.

DIFF-PACKAGE (P1 P2)

Prints the differences in the exported symbols list of two packages.

EDIT (&OPTIONAL ITEM &KEY (WAIT T WAIT-P))

DO: Create FILE if it doesn't exist, and Calls the editor with the FILE argument.

LESS (&REST ARGS)

COMMAND SEE: MORE

LIST-ALL-SYMBOLS (PACKAGE &KEY (SORTED T))

RETURN: A list of all the symbols present in the PACKAGE. PACKAGE: A package designator. SORTED: Whether the result list is sorted (default T).

LIST-EXTERNAL-SYMBOLS (PACKAGE &KEY (SORTED T))

RETURN: A list of all the symbols exported from the PACKAGE. PACKAGE: A package designator. SORTED: Whether the result list is sorted (default T).

LS (&REST ARGS)

COMMAND DO: List the files or directories. OPTIONS: -L long listing: item kind, size, date, name; otherwise only name. ARGUMENTS: A list of paths possibly containing wildcards. If none is given, then "*" is used.

LSCHAR (&KEY (START 0) (END 69632) NAME)

Prints all the characters of codes betwen start and end, with their names.

LSPACK (&REST ARGUMENTS)

(LSPACK [package [:SHOW-EXPORTS|:EXPORTS|:EXPORT|:T] [:HIDE-USED-BY|:SHORT|:S]]...) List all the packages, or only the packages matching PACKAGE (a regexp on clisp) dumping all the exported symbols when :SHOW-EXPORTS is specified, and not dumping the used-by list when :HIDE-USED-BY is specified. The keywords are tested with STRING-EQUAL.

LSSYMBOLS (&OPTIONAL (PACKAGE *PACKAGE*))

DO: Prints a list of the symbols in the PACKAGE (default: *PACKAGE*).

MKUPACK (&OPTIONAL NAME)

Makes a new, temporary, user package like COMMON-LISP-USER.

MORE (&REST ARGS)

COMMAND DO: concatenate and paginate a list of files. ARGUMENTS: If the first argument is :PAGE, then the second arguments is either an integer giving the page height, or NIL indicating that no pagination must be done; else the page height is *TERMINAL-HEGIHT*. The other arguments are paths of files to be dumped on *STANDARD-OUTPUT*.

MOZILLA-STRING (STRING)

Convert a string as copied from mozilla into unicode characters.

POPD

COMMAND DO: Unstack the working directory from the stack.

POPP

Pops the top of the package stack and assign it to *PACKAGE*.

PSWITCH (&OPTIONAL PACKAGE)

Switch between two packages.

PUSHD (&OPTIONAL PATH)

COMMAND DO: Push the current working directory onto the stack, and change the working directory to the path (or home directory). SEE; POPD, CD.

PUSHP (&OPTIONAL PACKAGE)

Push *PACKAGE* on a package stack, and makes the package designated by PACKAGE be the new *PACKAGE*. If PACKAGE is NIL, the rotate *PACKAGE* and the top of the package stack.

PWD

COMMAND DO: Returns the current working directory.

REPL

DO: Implements a minimalist CL REPL.

RESET-CLUSER

Reset the CL-USER package to a clean state.

UPTIME

Prints the uptime of this Common Lisp instance.

Private

GET-FIRST-WORD (STRING)

RETURN: The first word of the string, or the empty string.

STRING-MATCH-P (PATTERN STRING)

Matches a string.

Undocumented

FLOW-LIST (TITLE PLIST)

MACRO

Public

DEFINE-PACKAGE (NAME &REST DECLARATIONS)

DO: Declares a package. This includes loading the packages depended on, adding nicknames to the packages used under these nicknames, defining the package, and going into it (with IN-PACKAGE).

SHOW (&BODY EXPRESSIONS)

DO: Prints each expression and their values.

Private

HANDLING-ERRORS (&BODY BODY)

DO: Execute the BODY with a handler for CONDITION and SIMPLE-CONDITION reporting the conditions.

VARIABLE

Public

*EDITOR*

The editor function provided by the implementation.

Private

*START-TIME*

Records the time at which this Common Lisp instance was started.

Undocumented

*PACKAGE-STACK*

*USER-PACKAGES*