Ubuntu Manpages
% Reference Card for the ilisp Interface, as reported in ilisp-5.8. % Last edited: Sat Sep 27 20:07:53 1997 by vkyr (Valentino Kyriakides)

%**start of header 0wcountolumnsperpage

% This file can be printed with 1, 2, or 3 columns per page (see below). % Specify how many you want here. Nothing else needs to be changed.

olumnsperpage=3

% Copyright (c) 1997 by no one. e.g. distribute it at will, subject to % permissions below. % % Author: (e.g. please send obvious bugs to) % Valentino Kyriakides % Internet: kyriakides@lavielle.com % % Of course, no one makes any claims on this, nor do I promise to "support" it. % Thanks to Stephen Gildea, Paul Rubin, Bob Chassell, Len Tower, % and Richard Mlynarik for the excellent GNU Emacs reference card on which % this is based. % % The idea of this was to have a piece of paper that prods your memory if % you've forgotten the name of a function, a keybinding, etc. It assumes % pretty serious familiarity with the ilisp manual, but hopefully saves the effort % (in conjunction with all the manuals) of lugging out a % printed copy in most cases. It of course reflects my (the author's) % biases about what was likely to be interesting or used often. % % To view, do 'tex ilisp-refcard.tex'. % To print if you use columnsperpage=3, you must use have a dvips-like % program that prints in landscape format!

% This file is distributed in the hope that it will be useful, but WITHOUT % ANY WARRANTY. No author or distributor accepts responsibility to anyone % for the consequences of using it or for whether it serves any particular % purpose or describes any piece of software unless they say so in writing. % % Permission is granted to copy, modify and redistribute this source % file provided the permission notices are preserved on all copies. % % Permission is granted to process this file with TeX and print the results.

% This file is intended to be processed by plain TeX (TeX82). % % The final reference card has six columns, three on each side. % This file can be used to produce it in any of three ways: % 1 column per page % produces six separate pages, each of which needs to be reduced to 80%. % This gives the best resolution. % 2 columns per page % produces three already-reduced pages. % You will still need to cut and paste. % 3 columns per page % produces two pages which must be printed sideways to make a % ready-to-use 8.5 x 11 inch reference card. % For this you need a dvi device driver that can print sideways. % Which mode to use is controlled by setting olumnsperpage above.

efr{1.0} efyear{1997} efptember year vr}

efortcopyrightnotice{ 2 fill enterline{all September
year by Valentino Kyriakides. Permissions on back. vr}}

efopyrightnotice{ 2 fill enterline{Designed by Valentino Kyriakides (kyriakides@lavielle.com), 9/97.} enterline{Permission is granted to make distribute copies} enterline{of this card provided this permission notice is preserved.} \ndgroup}

% =================================================================== % Macros to define this "mode". % =================================================================== % % make % can be scanned without complaint. ef

0wdimenintercolumnskip 0wboxolumna 0wboxolumnb

ef0olumns{heolumnsperpage}

ssage{[0olumnsace
columnif 10olumns\lse sace per page]}

efaledmag#1{ scaled gstep #1}

% This multi-way format was designed by Stephen Gildea October 1986. if 10olumns



ntitlefont=ntnameenbf aledmag4
ntcfont=ntnameenbf aledmag3
ntbsecfont=ntnameenbf aledmag2
ntallfont=ntnamevenrm
ntallsy=ntnamevensy


otline{lio}
efkefootline{otline}} \lse




ntitlefont=cmbx10 aledmag3
ntcfont=cmbx10 aledmag2
ntbsecfont=cmbx10 aledmag1
ntallfont=cmr6
ntallsy=cmsy6
nt\ightrm=cmr8
nt\ightbf=cmbx8
nt\ightit=cmti8
nt\ighttt=cmtt8
nt\ightsy=cmsy8
extfont0=\ightrm
extfont2=\ightsy
efm{\ightrm}
ef}
efit{\ightit}
eft{\ighttt}
0rmalbaselineskip=.80rmalbaselineskip
0rmallineskip=.80rmallineskip
0rmallineskiplimit=.80rmallineskiplimit
0rmalbaselinesm %make definitions take effect


if 20olumns

otline{mlio}
efkefootline{otline}}
\lse if 30olumns

0pagenumbers
\lse
\rrhelp{You must set olumnsperpage equal to 1, 2, or 3.}
\rrmessage{Illegal number of columns per page}


intercolumnskip=.46in
efbc{a}
pt={%
% This next line is useful when designing the layout.
%immediate600ts with rstmark}
if xcolumnbc lticolumnformat obalefbc{a}
\lseif abc obaltboxolumnaolumnbox obalefbc{b}
%% in case we never use olumnb (two-column mode)
obaltboxolumnb
\lse obaltboxolumnbolumnbox obalefbc{c}}
eflticolumnformat{ipout

lumnbkipolumnbox}
kefootline}dvancepageno}
efolumnbox{{agebody}}


ef
if abc \lse0ll
if abc \lse0ll
\nd}

% we won't be using math mode much, so redefine some of the characters % we might want to talk about atcode`=12 atcode`_=12

hardef\=`\ hardef=` hardef=`

arindent
0pt arskip
1ex plus .5ex minus .5ex

efall{allfontextfont2=allsy

lmn{

%

%% KOT redefined a bit

%lbreak % 2ex minus 2ex {bsecfont #1}rk{#1}% % 1ex minus 1.5ex}

%% KOT redefined to cram more on lbreak
0.95ex minus 1.7ex {cfont #1}rk{#1}%
0.9ex minus 1.15ex}

lbreak
0.95ex minus 1.7ex {bsecfont #1}rk{#1}%
0.9ex minus 1.15ex}

sbsection#1{lbreak
0.95ex minus 1.7ex {bsecfont #1}rk{#1}%
0.9ex minus 1.15ex}

0wdimenyindent

efntedkeys{yindent=1em} ef\ndindentedkeys{yindent=0em} \ndindentedkeys

efaralign{kip

ef<#1>{$ngle$}

efd#1{{t#1}0ll} %0ll so not an abbrev even if period follows

efxample{arvmode
{oal ef\ndexample{\ndgroup}

efy#1#2{vmode
{

efom#1#2{vmode
{

ef
{

0wboxtaxbox tboxtaxbox 0wdimentaxwidth taxwidth=144

eftax#1#2{vmode
{
1fil
d{#2}

efhreecol#1#2#3{
&d{#3}quadr}

%**end of header ? % =================================================================== % Real refcard related things start here. % =================================================================== itle{ilisp/Emacs}{Interface Reference Card}

enterline{(for Gnu Emacs , XEmacs)}

This reference card is a quick-and-dirty guide to those parts of the ilisp manual, which are likely to be used often. It includes most of the ilisp Interface to emacs, plus many of the extensions defined in the {it ilisp online help}. It is {it not} a substitute for the ilisp online manual.

ction{The ilisp/Emacs Interface }

You can use the ilisp interface from either GNU Emacs or XEmacs. Put these lines in your {t .emacs} file for clisp and allegro:

d{(setq load-path (cons (expand-file-name }

r/local/lib/ilisp-5.8/") load-path))} d{(require 'completer)}

d{(autoload 'clisp "ilisp" }

d{(setq clisp-program "/usr/local/bin/clisp -I")}

d{(autoload 'allegro "ilisp" }

d{(setq allegro-program "/usr/local/bin/cl")}

Then invoke lisp with either d{M-x clisp}, or with d{M-x allegro}.

`C-z' is the prefix-key for most ILISP commands. This can be changed by setting the variable `ilisp-prefix'.

For online help with emacs, use d{C-h f}, d{describe-function}.

ortsubsection{Interrupts, aborts and errors}

If you want to abort the last command you can use `C-g'.

If you want to abort all commands, you should use the command `abort-commands-lisp' (`C-z g'). Commands that are aborted will be put in the buffer `*Aborted Commands*' so that you can see what was aborted. If you want to abort the currently running top-level command, use `interrupt-subjob-ilisp' (`C-c C-c'). As a last resort, `M-x panic-lisp' will reset the ILISP state without affecting the inferior LISP so that you can see what is happening.


`delete-char-or-pop-ilisp' (`C-d') will delete prefix characters unless you are at the end of an ILISP buffer in which case it will pop one level in the break loop.


`reset-ilisp', (`C-z z') will reset the current inferior LISP's top-level so that it will no longer be in a break loop.

y{return-ilisp}{RET} y{interrupt-subjob-ilisp}{C-c C-c} y{abort-commands-lisp}{C-z g} y{M-x panic-lisp}{} y{reset-ilisp}{C-z z} y{delete-char-or-pop-ilisp}{C-d}

bsection{Editing Lisp Forms (general)}

Indentation, parenthesis balancing, and comment commands.

y{indent-line-ilisp}{TAB} y{indent-sexp-ilisp}{M-C-q} y{reindent-lisp}{M-q} y{comment-region-lisp}{C-z ;} y{find-unbalanced-lisp}{C-z )} y{close-all-lisp}{]}

bsection{Eval and compile functions}

Functions for eval/compile in code buffers.

y{ilisp-prefix}{C-z} y{close-and-send-lisp}{C-]} y{newline-and-indent-lisp}{LFD} y{eval-defun-lisp}{C-z e} y{eval-defun-lisp}{M-C-x} y{eval-defun-and-go-lisp}{C-z C-e} y{eval-region-lisp}{C-z r} y{eval-region-and-go-lisp}{C-z C-r} y{eval-next-sexp-lisp}{C-z n} y{eval-next-sexp-and-go-lisp}{C-z C-n} y{compile-defun-lisp}{C-z c} y{compile-defun-lisp-and-go}{C-z C-c} y{compile-region-lisp}{C-z w} y{compile-region-and-go-lisp}{C-z C-w}

bsection{Documentation functions}

`describe-lisp', `inspect-lisp', `arglist-lisp', and `documentation-lisp' switch whether they prompt for a response or use a default when called with a negative prefix. If they are prompting, there is completion through the inferior LISP by using `TAB' or `M-TAB'. When entering an expression in the minibuffer, all of the normal ilisp commands like `arglist-lisp' also work.


Commands that work on a function will use the nearest previous function symbol. This is either a symbol after a `the start of the current list.

y{arglist-lisp}{C-z a} y{documentation-lisp}{C-z d} y{describe-lisp}{C-z i} y{inspect-lisp}{C-z I}

bsection{The Franz Online Manual}

Invoke with d{M-x fi:clman} or d{C-z D}, these are used to view the Franz online manual if available. Packages nicknames limit search: cltl1, comp, composer, defsys, excl, ff, inspect, ipc, lisp, mp, prof, stream, sys, tpl, xcw, xref. Note the useful about-* man pages (e.g. about-top-level).

y{fi:clman}{C-z D} y{fi:clman-apropos}{C-z A} %y{fi:clman-next-entry}{n} %y{fi:clman-search-forward-see-alsos}{s} %y{fi:clman-package-help}{p} %y{fi:clman-flush-doc}{C-c C-c}

ortsubsection{Tracing functions}

Function which traces the current defun. When called with a numeric prefix the function will be untraced. When called with negative prefix, prompts for function to be traced.

y{trace-defun-lisp}{C-z t}

ortsubsection{Macroexpansion}


These commands apply to the next sexp. If called with a positive
numeric prefix, the result of the macroexpansion will be inserted
into the buffer. With a negative prefix, prompts for expression
to expand.

y{macroexpand-lisp}{C-z M} y{macroexpand-1-lisp}{C-z m}

ortsubsection{Package Commands}

The first time an inferior LISP mode command is executed in a Lisp Mode buffer, the package will be determined by using the regular expression `ilisp-package-regexp' to find a package sexp and then passing that sexp to the inferior LISP through `ilisp-package-command'. For the `clisp' dialect, this will find the first `(in-package PACKAGE)' form in the file. A buffer's package will be displayed in the mode line. If a buffer has no specification, forms will be evaluated in the current inferior LISP package.

Buffer package caching can be turned off by setting the variable `lisp-dont-cache-package' to `T'. This will force ILISP to search for the closest previous `ilisp-package-regexp' in the buffer each time an inferior LISP mode command is executed.

y{package-lisp}{C-z p} y{set-package-lisp}{C-z P} y{M-x set-buffer-package-lisp}{}

ortsubsection{Files and directories}

File commands in lisp-source-mode buffers keep track of the last used directory and file. If the point is on a string, that will be the default if the file exists. If the buffer is one of `lisp-source-modes', the buffer file will be the default. Otherwise, the last file used in a lisp-source-mode will be used.

y{find-file-lisp}{C-x C-f} y{load-file-lisp}{C-z l} y{compile-file-lisp}{C-z k} y{default-directory-lisp}{C-z !}

ortsubsection{Completion}

Commands to reduce number of keystrokes.

y{complete-lisp}{M-TAB} y{complete}{M-RET}

%ortcopyrightnotice

bsection{Command history}

ILISP mode is built on top of `comint-mode', the general command interpreter buffer mode. As such, it inherits many commands and features from this, including a command history mechanism.

Each ILISP buffer has a command history associated with it. Commands that do not match `ilisp-filter-regexp' and that are longer than `ilisp-filter-length' and that do not match the immediately prior command will be added to this history.

y{comint-next-input}{M-n} y{comint-previous-input}{M-p} y{comint-previous-similar-input}{M-s} y{comint-psearch-input}{M-N} y{comint-msearch-input}{M-P} y{comint-msearch-input-matching}{C-c R}

bsection{Source Code Commands}


The following commands all deal with finding things in source code. The first time that one of these commands is used, there may be some delay while the source module is loaded. When searching files, the first applicable rule is used:


* try the inferior LISP,


* try a tags file if defined,


* try all buffers in one of `lisp-source-modes' or all files defined
using `lisp-directory'.


`M-x lisp-directory' defines a set of files to be searched by the source code commands. It prompts for a directory and sets the source files to be those in the directory that match entries in `auto-mode-alist' for modes in `lisp-source-modes'. With a positive prefix, the files are appended. With a negative prefix, all current buffers that are in one of `lisp-source-modes' will be searched. This is also what happens by default. Using this command stops using a tags file.

ortsubsection{}

`edit-definitions-lisp', `who-calls-lisp', and `edit-callers-lisp' will switch whether they prompt for a response or use a default when called with a negative prefix. If they are prompting, there is completion through the inferior LISP by using `TAB' or `M-TAB'. When entering an expression in the minibuffer, all of the normal ILISP commands like `arglist-lisp' also work.

ortsubsection{}

`edit-definitions-lisp' (`M-.') will find a particular type of definition for a symbol. It tries to use the rules described above. The files to be searched are listed in the buffer `*Edit-Definitions*'. If `lisp-edit-files' is nil, no search will be done if not found through the inferior LISP. The variable `ilisp-locator' contains a function that when given the name and type should be able to find the appropriate definition in the file. There is often a flag to cause your LISP to record source files that you will need to set in the initialization file for your LISP. The variable is `*record-source-files*' in both allegro and lucid. Once a definition has been found, `next-definition-lisp' (`M-,') will find the next definition (or the previous definition with a prefix).

ortsubsection{}

`edit-callers-lisp' (`C-z ^') will generate a list of all of the callers of a function in the current inferior LISP and edit the first caller using `edit-definitions-lisp'. Each successive call to `next-caller-lisp' (`M-`') will edit the next caller (or the previous caller with a prefix). The list is stored in the buffer `*All-Callers*'. You can also look at the callers by doing `M-x who-calls-lisp'.

ortsubsection{}

`search-lisp' (`M-?') will search the current tags files, `lisp-directory' files or buffers in one of `lisp-source-modes' for a string or a regular expression when called with a prefix. `next-definition-lisp' (`M-,') will find the next definition (or the previous definition with a prefix).

ortsubsection{}

`replace-lisp' (`M-"') will replace a string (or a regexp with a prefix) in the current tags files, `lisp-directory' files or buffers in one of `lisp-source-modes'.

y{M-x lisp-directory}{} y{edit-definitions-lisp}{M-.} y{next-definition-lisp}{M-,} y{edit-callers-lisp}{C-z ^} y{next-caller-lisp}{M-`} y{M-x who-calls-lisp}{} y{search-lisp}{M-?} y{replace-lisp}{M-"}

bsection{Batch commands}

The following commands all deal with making a number of changes all at once. The first time one of these commands is used, there may be some delay as the module is loaded. The eval/compile versions of these commands are always executed asynchronously.


`mark-change-lisp' (`C-z SPC') marks the current defun as being changed. A prefix causes it to be unmarked. `clear-changes-lisp' (`C-z * 0') will clear all of the changes. `list-changes-lisp' (`C-z * l') will show the forms currently marked.

`eval-changes-lisp' (`C-z * e'), or `compile-changes-lisp' (`C-z * c') will evaluate or compile these changes as appropriate. If called with a positive prefix, the changes will be kept. If there is an error, the process will stop and show the error and all remaining changes will remain in the list. All of the results will be kept in the buffer `*Last-Changes*'.

y{mark-change-lisp}{C-z SPC} y{eval-changes-lisp}{C-z * e} y{compile-changes-lisp}{C-z * c} y{clear-changes-lisp}{C-z * 0} y{list-changes-lisp}{C-z * l}

bsection{Switching between interactive and raw keyboard modes}

There are two keyboard modes for interacting with the inferior LISP,

where keys are interpreted as commands to EMACS and nothing is sent to the inferior LISP unless a specific command does so. In raw mode, all characters are passed directly to the inferior LISP without any interpretation as EMACS commands. Keys will not be echoed unless ilisp-raw-echo is T.

Raw mode can be turned on interactively by the command `raw-keys-ilisp' (`C-z mode can also be turned on/off by inferior LISP functions if the command `io-bridge-ilisp' (M-x io-bridge-ilisp) has been executed in the inferior LISP either interactively or on a hook. To turn on raw mode, a function should print ^[1^] and to turn it off should print ^[0^]. An example in Common LISP would be:

d{(progn (format t "?1?") }

bsection{}

opyrightnotice