Note that this modified reference card (below) assumes the use of the customized .emacs init file to make the key sequences much more convenient. LISP has many hundreds of commands found in the standard reference card above. The specialized cusor movement and cut/paste settings (shown below) override a few of the standard settings and are much more convenient than the defaults.
Sample Emacs Init File to use with the key sequences below. Copy to .emacs for auto loading at startup, or use M-x load-file RET Sample-init.el. You may have to set your HOME environment variable to find the .emacs file automatically. Search the web for instructions on the EMACS HOME variable.
To run ABCL LISP directly, you will need to modify this statement in the sample-init.el file:
(setq inferior-lisp-program "c:/e/abcl/a") Windows example pointing to an a.bat file that executes the one line: java -jar abcl.jar
Meta Key: The Meta key is used like an additional CONTROL key. It is ugly to look at, but actually easy to type. C-[ is the key sequence for Meta. It is commonly used with the X key to enter commands (M-x, means press C-[ and then X ). You can also use ESC for meta, but this is hard to reach and slow.
suspend Emacs (or iconify it) C-z exit Emacs permanently C-x C-c
read a file into Emacs C-x C-f save a file back to disk C-x C-s save all files C-x s insert contents of another file into this buffer C-x i write buffer to a specified file C-x C-w Command and filename completion works. Try the tab key to complete strings. Buffers/Windows/Files. Think of it this way: files live on disk, buffers live in the computer's memory, and windows display the contents of buffers when you want to look at them. Delete char forward/back C-d and C-h Center the current buffer in the window C-l Move foward / back one word C-w and C-q End of line, beginning of line C-e and C-a Move to next/previous line C-n and C-p Next/previous page C-v and C-t Top/bottom of file C-c, t and C-c, b Search forward / backward C-s, C-r Set the mark C-spacebar Kill a line C-k Kill the region C-c, C-k Put it back / insert C-y Toggle from current position to mark C-x, C-x Enter the current date C-c, D Open a command shell (very handy!) buffer M-x, "shell" Switch to named buffer C-x, b Toggle with other window C-x, o Split the emacs window into two C-x 2 Join the emacs windows into one C-x 1 load an emacs file (e.g., the init file) M-x, load-file RET "Sample-init.el" Show all active buffers C-x, C-b Directory listing of current directory C-x, d, RET Reformat the current paragraph of text M-q A new named command shell buffer C-u, M-x, shell
Indent a program line correctly Tab or C-i Evaluate current defun in LISP buffer C-c, C-e Evaluate current region in LISP buffer C-c, C-r Run lisp in a shell buffer M-x, "run-lisp" (assumes sample-init.el file is set up)Notes: You will need to point to lisp in your emacs init file (e.g. in the sample-init.el file above, point a variable in it to the batch file to run ABCL). Otherwise you can open a commang shell [M-x shell] and start lisp up in it. In this case the LISP evaluation commands won't work, but you can just have paste functions into the LISP buffer to define them, or reload the .lisp file.
Very handy: Set the mark with C-spacebar. As you move the cursor your region expands from the mark. C-c, C-K to kill the region. It is now in the clipboard. You can use C-y to paste it anywhere in the buffer, or into another buffer, or into another application that reads the clipboard.