Common Lisp Package: ABLE

README:

FUNCTION

Public

Undocumented

START

Private

CREATE-WIDGETS

Creates main window, layout controls and set-up some key bindings.

DEDUCE-PATH-SEPARATOR (PATHSTRING)

Is this a forwardslash or backslash platform?

FILETYPE? (PATH TYPES)

Is the file specified in path of one of the types specified in types?

FIND-CURRENT-FUNCTION (CODE-STRING POS)

From the cursor, finds the current function as token, start and end indices.

FORMAT-LISP-FORM (CODE-STRING)

Re-indents the supplied code-string.

FUNCTION-KEY (FUN)

look up the key for this function

FUNCTION-LAMBDA-LIST (FN)

Return an argument list for the supplied function.

GET-COL-INTEGER (TEXT-INDEX)

Extracts the col number from a Tk text index.

GET-ROW-INTEGER (TEXT-INDEX)

Extracts the row number from a Tk text index.

HYPERSPEC-LOOKUP (TOKEN)

Look-up the current symbol in the Hyperspec.

KEY-FUNCTION (KEY)

look up the function for this key

LISP-FILE? (PATH)

Does path represent a lisp source file?

LOAD-SYMBOL-TREE

Load symbol metadata used for syntax highlighting, indentation, symbol completion, hyperspec lookup and call-tips.

LOAD-USER-CONFIG

Allows the user to provide a ~/.able file to override any of the default configuration settings.

LONGEST-PREFIX-MATCH (LIST)

Takes a list of strings and returns their longest common lexical prefix.

ON-INVOKE-DEBUGGER (&OPTIONAL EVENT)

invoke the native CL debugger (including hooks such as slime)

PARSE-WATCH-SYSTEMS

If the user specified directories to watch, parse them here.

PREFIX-P (SEQUENCE PREFIX &OPTIONAL (START 0))

Is 'prefix' the prefix of 'sequence', optionally starting at 'start'.

RANDOMS (COUNT &OPTIONAL (LIMIT 64))

Generate a list of size 'count' random numbers bounded by 'limit'

SAVE-FILE (FILE PATH)

Saves a file (a buffer) under the specified path

SPLIT (STRING CHAR)

Split string on char.

SPLIT-AT (COLLECTION N)

Split a sequence at position 'n', returning both halves.

STRPOS-TO-TEXTIDX (STR POS)

Convert a string position into a Tk text index.

TEXT-COL-ADD (TEXT-INDEX INCREMENT)

Increments the col of a Tk text index by increment (i.e. 4.1 -> 4.2).

TEXT-ROW-ADD (TEXT-INDEX INCREMENT)

Increments the row of a Tk text index by increment (i.e. 5.0 -> 6.0).

TRIM-CODE (CODESTRING)

Tidy strings front and back.

UNFORMAT-LISP-FORM (CODE-STRING)

Strips out the indentation for a block of code. Also 'corrects' code where Tab has been used for indentation.

Undocumented

ADD-KEY-BINDING (CONTROL BINDING FUNCTION &OPTIONAL (EXCLUSIVE NIL))

ADD-USER-LOAD-PATHS

BIND-COMMANDS

CLEAR-COMPLETION-DATA

CREATE-MENUS

DELIVER

DIRNAME-FROM-PATHNAME (PATHNAME)

DIRNAME-FROM-PATHSTRING (PATHSTRING)

ERROR-MESSAGE (MSG)

FILENAME-FROM-PATHNAME (PATHNAME)

FILENAME-FROM-PATHSTRING (PATHSTRING)

FILETYPE-FROM-PATHSTRING (PATHSTRING)

FIND-CURRENT-SEXP (CODE-STRING POS)

FIND-DEFINITION (NAME)

FIND-NEXT-CLOSE (CODE-STRING START)

FIND-NEXT-OPEN (CODE-STRING START)

FOCUS-EDITOR

FOCUS-LISTENER

FOLDL (FUN ID LIST)

GET-LAST-DIRECTORY

GET-LAST-FILE

GET-NEXT-COMPLETION

GET-SELECTED-TEXT

GET-UNTITLED

HIDE-CALLTIP

INFO-MESSAGE (MSG &OPTIONAL (COLOR *HIGHLIGHT-TEXT*))

LOAD-ARGLIST (TOKEN)

LOAD-DEFINITIONS (FILENAME)

LOAD-DEFINITIONS-FOR-DIRECTORY (DIRECTORY)

MAKE-SYMBOL-METADATA (TYPE LINE FILE)

NO-MESSAGE

ON-ASDF-LOAD (&OPTIONAL EVENT)

ON-CLOSE-FILE (&OPTIONAL EVENT)

ON-COMPILE-FILE (&OPTIONAL EVENT)

ON-ESCAPE (&OPTIONAL EVENT)

ON-FILE-MODIFIED (EVT)

ON-GOTO (&OPTIONAL EVENT)

ON-LOAD-FILE (&OPTIONAL EVENT)

ON-NAVIGATE-TO-DEFINITION (SYMBOL &OPTIONAL (RETRY NIL))

ON-NEW-FILE (&OPTIONAL EVENT)

ON-NEXT-FILE (&OPTIONAL EVENT)

ON-OPEN-FILE (&OPTIONAL EVENT)

ON-OPEN-FILE-BROWSER (&OPTIONAL EVENT)

ON-QUIT (&OPTIONAL EVENT)

ON-RELOAD-FILE (&OPTIONAL EVENT)

ON-RESET-LISTENER (&OPTIONAL EVENT)

ON-SAVE-AS-FILE (&OPTIONAL EVENT)

ON-SAVE-AS-FILE-BROWSER (&OPTIONAL EVENT)

ON-SAVE-FILE (&OPTIONAL EVENT)

ON-SEARCH-AGAIN (&OPTIONAL EVENT)

ON-SELECT-FILE (&OPTIONAL N)

OPEN-FILE (FILEPATH)

OPEN-FILE-AT-LINE (FILE LINE)

PARSE-LINE (LINE LINE-NO FILENAME)

PARSE-SYMBOL-DEFINITION (STRING DEFINING-FORM FILENAME LINE-NO)

PATHNAME-MESSAGE

RESET-LAST-DIRECTORY

RESET-UNTITLED

SHUTDOWN

START-PROCESS (COMMAND-LINE)

STRING-REPLACE (STRING FROM TO)

TAKE (LIST N)

UPDATE-CURRENT-BUFFERS (BUFFER-MANAGER)

UPDATE-LAST-DIRECTORY (FILEPATH)

MACRO

Private

GET-INDENT-LEVEL (TOKEN)

Deduce how much to indent based on the token supplied. The user can supply their own indentation rules in the configuration file.

WHEN-STRING (STRING &OPTIONAL (OTHER T) &BODY BODY)

Evaluate body if string is valid (non-null and non-empty).

WITH-ABLE-STREAMS (STREAM &BODY BODY)

Bind all interesting streams to STREAM during BODY

WITH-TEMPORARY-VALUE (PLACE TEMPORARY &BODY BODY)

A simple transactional re-binding of a variable which is unwound at the end of the block. Note that the following semantics are in operation: an error condition raised by code in the body will be caught, the original value will be restored and the error condition wil be re-raised for the calling code to handle. Not intended as a replacement for specials!

Undocumented

EQUAL-CASE (KEYFORM &BODY CLAUSES)

WHEN-LET ((VAR FORM) &BODY BODY)

WITH-STATUS-MSG (MSG &REST BODY)

GENERIC-FUNCTION

Private

CORRECT-PATH (PATHNAME)

Normalises all paths such that backslashes become forward slashes

Undocumented

ADD-BUFFER (BUFFER-MANAGER FILE-PATH &OPTIONAL OPEN-FILE-P)

ALL-SAVED-BUFFER-P (BUFFER-MANAGER)

APPLY-HIGHLIGHT (TXT START END)

AT-LEAST-ONE-BUFFER-P (BUFFER-MANAGER)

BUFFER-OUTPUT (USER-STREAM STRING)

CLEAR (LISTENER)

CLOSE-BUFFER (BUFFER BUFFER-MANAGER)

CODE-COMPLETE (TEXT)

EVALUATOR (LISTENER CODE-STRING &OPTIONAL (APPEND-INPUT))

FIND-BUFFER (BUFFER-MANAGER PATH-NAME)

FIND-TEXT (EDITOR SEARCH-TEXT)

FLUSH (USER-STREAM)

FOCUS (LISTENER)

GET-BUFFER-INDEX (BUFFER-MANAGER PATH-NAME)

GET-CURRENT-TEXT-CTRL (BUFFER-MANAGER)

GET-CURRENT-TOKEN (TEXT)

GET-FILENAME (LISTENER &OPTIONAL (TEXT))

GET-LAST-COMMAND (RB)

GET-LAST-COMMAND-POS (RB)

GET-NEXT-BUFFER (BUFFER BUFFER-MANAGER)

GET-TOKEN-PREFIX (TEXT)

GET-USER-INPUT (LISTENER)

GOTO (TEXT LINE)

HIDE-PAREN-MATCH (TXT)

HIGHLIGHT (TXT EVENT &OPTIONAL AMOUNT)

INDENT-BLOCK (TXT)

INDENT-CURRENT-LINE (TXT &OPTIONAL (TEXT-TO-CURSOR))

INPUT-PROMPT (LISTENER PROMPT-STRING &OPTIONAL DEFAULT-INPUT)

INSERT-COMMAND (LISTENER TEXT)

KEY-PRESS-ALLOWED-P (LISTENER)

LOAD-TEXT (TXT FILEPATH)

MATCH-PAREN (TXT &OPTIONAL (STR))

NEW-BUFFER-P (BUFFER)

NEXT-COMMAND (RB)

ON-CODE-COMPLETE (LISTENER)

ON-COPY (TXT)

ON-COPY-SEXP-TO-REPL (TEXT)

ON-CTRL-LEFT-BRACKET-KEY (TXT EVENT)

ON-CUT (TXT)

ON-DELETE-KEY (TXT EVENT)

ON-FOCUS-IN (TXT)

ON-FOCUS-OUT (TXT)

ON-KEY-DOWN (TXT EVENT)

ON-KEY-PRESS (LISTENER)

ON-LEFT-BRACKET-KEY (TXT EVENT)

ON-LEFT-CLICK (TXT)

ON-LOOKUP-DEFINITION (TEXT)

ON-MACRO-EXPAND (TEXT)

ON-PASTE (TXT)

ON-RE-INDENT (TXT)

ON-RESIZE (LISTENER)

ON-RETURN-KEY (TXT EVENT)

ON-SELECT-ALL (TXT)

ON-SPACE-KEY (TXT EVENT)

ONE-OF (LISTENER MESSAGE ALLOWED-ANSWERS DEFAULT-ANSWER)

OUTPUT (LISTENER MESSAGE &OPTIONAL (TAG))

PATHNAME-COMPLETE (LISTENER)

PREV-COMMAND (RB)

PROMPT (LISTENER &KEY (PROMPT >) (CLEAR NIL))

REBIND-KEYS (LISTENER)

REPL-DELETE-KEY-DOWN (LISTENER)

RESET (LISTENER &KEY HARD)

SAVE-BUFFER (BUFFER FILE-PATH)

SAVED-BUFFER-P (BUFFER)

SEARCH-TEXT (EDITOR)

SEARCH-TEXT-AGAIN (EDITOR)

SELECT-BUFFER (BUFFER-MANAGER FILE-PATH)

SELECT-NEXT-BUFFER (BUFFER-MANAGER BUFFER)

SET-MESSAGE (SB MSG &OPTIONAL (HIGHLIGHT))

SEXP-BEFORE-CURSOR (TXT &OPTIONAL (STR))

SHOW-CALLTIP (TXT &OPTIONAL (STR))

STORE-COMMAND (RB COMMAND-TEXT)

SUBMIT-REPL-INPUT (LISTENER)

UNFOCUS (LISTENER)

YES-NO (LISTENER MESSAGE &OPTIONAL (AFFIRMATIVE-ANSWERS) (DEFAULT-ANSWER))

SLOT-ACCESSOR

Private

Undocumented

BUFFERS (OBJECT)

SETFBUFFERS (NEW-VALUE OBJECT)

CACHED-MESSAGE (OBJECT)

SETFCACHED-MESSAGE (NEW-VALUE OBJECT)

COMMAND-HISTORY (OBJECT)

SETFCOMMAND-HISTORY (NEW-VALUE OBJECT)

COMPLETE-MODE (OBJECT)

SETFCOMPLETE-MODE (NEW-VALUE OBJECT)

CURRENT-COMMAND (OBJECT)

SETFCURRENT-COMMAND (NEW-VALUE OBJECT)

EDIT-CTRL (OBJECT)

SETFEDIT-CTRL (NEW-VALUE OBJECT)

FILE-PATH (OBJECT)

SETFFILE-PATH (NEW-VALUE OBJECT)

INDEX (OBJECT)

SETFINDEX (NEW-VALUE OBJECT)

INFERIOR-WIN (OBJECT)

SETFINFERIOR-WIN (NEW-VALUE OBJECT)

INPUT-BUFFER (OBJECT)

SETFINPUT-BUFFER (NEW-VALUE OBJECT)

LABEL (OBJECT)

SETFLABEL (NEW-VALUE OBJECT)

OUTPUT-BUFFER (OBJECT)

SETFOUTPUT-BUFFER (NEW-VALUE OBJECT)

PLAINTEXTP (OBJECT)

SETFPLAINTEXTP (NEW-VALUE OBJECT)

REPL-INSERT-POINT (OBJECT)

SETFREPL-INSERT-POINT (NEW-VALUE OBJECT)

SELECTED-BUFFER (OBJECT)

SETFSELECTED-BUFFER (NEW-VALUE OBJECT)

VARIABLE

Private

*BUFFER-FONT*

The font used for the editor and REPL. Courier is guaranteed to be available on all Tk platforms.

*BUFFER-MANAGER*

Provides operations on buffers and lists of buffers

*BUFFER-MENUBAR*

store a reference to the buffer menubar for listing the open buffers

*EDITOR-FRAME*

Container for the text-editor control

*HYPERSPEC-ROOT*

Where to find the Common Lisp Hyperspec. The default is to use the version on the LispWorks server but this can be overriden with a local URL to a copy on your machine. You must ensure that this uses a URL syntax understood by the browser specified in *web-browser* below

*INDENTATION-RULES*

This is a list of pairs comprising the symbol and the required indentation size. There are additional rules for let blocks as well as a default 2-character indent.

*KEY-ASDF-LOAD*

Load an ASDF system

*KEY-CLOSE-FILE*

Close a file

*KEY-CODE-COMPLETE*

Cycle available code completions

*KEY-COMPILE-FILE*

Compile the current file

*KEY-COPY*

Copy the selected text

*KEY-COPY-TO-REPL*

Evaluate form

*KEY-CUT*

Cut the selected text

*KEY-FIND*

Find text in current file

*KEY-FIND-AGAIN*

Repeat the previous search

*KEY-GOTO-LINE*

Goto line number

*KEY-INVOKE-DEBUGGER*

Invoke the native debugger

*KEY-LOAD-FILE*

Load a file from disc

*KEY-LOOKUP*

Find definition in Hyperspec or src

*KEY-MACRO-EXPAND*

Macroexpand form in listener

*KEY-NEW-FILE*

Create a new file

*KEY-NEXT-FILE*

Cycle through open files

*KEY-OPEN-FILE*

Open a new file

*KEY-OPEN-FILE-BROWSER*

Open a new file, with browser GUI

*KEY-PASTE*

Paste the selected text

*KEY-QUIT-ABLE*

Quit ABLE

*KEY-REFORMAT*

Indent the current form

*KEY-RELOAD-FILE*

Re-load the current file

*KEY-RESET-LISTENER*

Reset the listener

*KEY-SAVE-AS-FILE*

Save the current file under a new name

*KEY-SAVE-AS-FILE-BROWSER*

Save the current file under a new name, with browser GUI

*KEY-SAVE-FILE*

Save the current file

*KEY-SELECT-ALL*

Select all text in the file

*KEY-SELECT-FILE*

Select open file

*KEYTABLE*

plist mapping key bindings to functions

*LISTENER*

The Lisp listener interface and command interpreter

*LISTENER-LINES*

The number of text output lines to display in the listener. The listener can be scrolled using the mouse wheel but only this number of lines are displayed at a time.

*STATUSBAR*

The bar at the bottom of the screen

*SYMBOLS*

Internal symbol database

*USER-LOAD-PATHS*

A list of additional user specified places to find systems

*WATCH-DIRECTORIES*

A list of directories to watch and parse for defining forms

Undocumented

*HIGHLIGHT-BACKGROUND*

*HIGHLIGHT-COMMENTS*

*HIGHLIGHT-ERROR*

*HIGHLIGHT-PAREN-MATCH*

*HIGHLIGHT-PRIMARY*

*HIGHLIGHT-SECONDARY*

*HIGHLIGHT-TEXT*

*HYPERSPEC-INDEX*

*TEXT-KEYS*

*WEB-BROWSER*

*WINDOW-HEIGHT*

*WINDOW-WIDTH*

*WINDOW-X*

*WINDOW-Y*

CLASS

Private

USER-STREAM

Provides a bi-directional stream to act as a conduit for the user input and output in the listener. Typically bind an instance of this to all interesting streams during evaluation.

Undocumented

BUFFER

BUFFER-MANAGER

LISTENER

STATUSBAR

CONSTANT

Private

Undocumented

+LPAREN+

+RPAREN+