CONTENTS Title Page Copyright Page Preface Part I VAX LISP System Concepts and Facilities for VMS Systems 1 Introduction to VAX LISP 1.1 Overview of VAX LISP 1.1.1 DCL LISP Command 1.1.1.1 Interpreter 1.1.1.2 Compiler 1.1.2 Editor 1.1.3 Error Handler 1.1.4 Inspector 1.1.5 Debugging Facilities 1.1.6 Pretty Printer 1.1.7 Call-Out Facility 1.1.8 Call-Back Facility 1.1.9 Alien Structure Facility 1.1.10 Interrupt Function Facility 1.1.11 VWS Graphics Interface 1.1.12 DECwindows Interface 1.1.13 CLX Interface 1.1.14 System-Building Utility 1.1.15 VAX LISP Function, Macro, and Variable Descriptions for VMS 1.2 Help Facilities 1.2.1 DCL Help 1.2.2 DECwindows Help 1.2.3 LISP Help 1.3 VMS File Specifications 1.4 Logical Names 1.5 Entering DCL Commands 2 Using VAX LISP 2.1 Invoking LISP 2.2 Exiting LISP 2.3 Entering Input 2.4 Deleting and Editing Input 2.5 Entering the Debugger 2.6 Using Control Key Characters 2.7 Creating Programs 2.8 Loading Files 2.9 Compiling Programs 2.9.1 Compiling Individual Functions and Macros 2.9.2 Compiling Files 2.9.3 Advantages of Compiling LISP Expressions 2.9.4 Advantage of Not Compiling LISP Expressions 2.10 DCL LISP Command Qualifiers 2.10.1 Three Ways to Use the DCL LISP Command 2.10.2 /COMPILE 2.10.3 /CSTACK 2.10.4 /ERROR_ACTION 2.10.5 /[NO]INITIALIZE 2.10.6 /INTERACTIVE 2.10.7 /[NO]LIST 2.10.8 /[NO]MACHINE_CODE 2.10.9 /MEMORY 2.10.10 /[NO]OPTIMIZE 2.10.11 /[NO]OUTPUT_FILE 2.10.12 /RESUME 2.10.13 /[NO]VERBOSE 2.10.14 /[NO]WARNINGS 2.11 Using Suspended Systems 2.11.1 Creating a Suspended System 2.11.2 Resuming a Suspended System 2.12 Using Subprocesses 2.12.1 Creating a Subprocess 2.12.2 Connecting to a Subprocess 2.12.3 Exiting from a Subprocess 3 Using the VAX LISP Editor 3.1 Introduction to the Editor 3.1.1 Editing Cycle 3.1.2 Invoking the Editor 3.1.3 Interacting with the Editor 3.1.3.1 Getting Help 3.1.3.2 Input Completion and Alternatives 3.1.3.3 Errors and Other Problems 3.1.4 Moving Work Back to LISP 3.1.5 Returning to the LISP Interpreter 3.1.6 Summary of Commands 3.2 Editing Operations 3.2.1 Keypad 3.2.2 Inserting and Formatting Text 3.2.2.1 Inserting Text 3.2.2.2 Typing and Formatting LISP Code 3.2.2.3 Inserting Nongraphic Characters 3.2.3 Moving the Cursor 3.2.3.1 Moving with the Keypad and Arrow Keys 3.2.3.2 Moving in LISP Code 3.2.3.3 Moving with the Pointer (VWS VAXstation Only) 3.2.4 Modifying Text 3.2.4.1 Deleting Text 3.2.4.2 Undeleting Text 3.2.4.3 Cutting and Pasting Text 3.2.4.4 Changing Case 3.2.4.5 Substituting Text 3.2.4.6 Inserting a File or Buffer 3.2.5 Repeating an Operation 3.2.6 Summary of Commands 3.3 Using Multiple Buffers and Windows 3.3.1 Introduction to Buffers and Windows 3.3.2 Creating New Buffers from Within the Editor 3.3.3 Working with Buffers 3.3.3.1 Saving Buffer Contents 3.3.3.2 Deleting Buffers 3.3.3.3 Buffer Name Conflicts 3.3.4 Manipulating Windows 3.3.5 Moving Text Between Buffers 3.3.6 Summary of Commands 3.4 Recovering from Problems 3.5 Customizing the Editor 3.5.1 Binding Keys to Commands 3.5.1.1 Binding Within the Editor 3.5.1.2 Binding from the LISP Interpreter 3.5.1.3 Selecting a Key or Key Sequence 3.5.1.4 Key Binding Context and Shadowing 3.5.2 Keyboard Macros 3.5.3 Summary of Commands 3.6 Using the Editor on a VWS VAXstation 3.6.1 Before You Start 3.6.1.1 Activating Lines in LISPSTART.COM 3.6.1.2 Setting the Terminal Emulator to NOFALLBACK Mode 3.6.2 Screen Appearance and Behavior 3.6.3 Editing with the Pointer 3.6.3.1 Selecting and Removing Windows 3.6.3.2 Moving the Text Insertion Cursor and Marking Text 3.6.3.3 Cutting and Pasting 3.6.3.4 Invoking the DESCRIBE Function and Matching Parentheses 3.6.3.5 Information About Pointer Effects 3.6.4 Binding Pointer Buttons to Commands 4 Debugging Facilities 4.1 Control Variables 4.2 Control Stack 4.3 Break Loop 4.3.1 Invoking the Break Loop 4.3.2 Exiting the Break Loop 4.3.3 Using the Break Loop 4.3.4 Break Loop Variables 4.4 Debugger 4.4.1 Invoking the Debugger 4.4.2 Exiting the Debugger 4.4.3 Using Debugger Commands 4.4.3.1 Arguments 4.4.3.2 Debugger Commands 4.4.4 Using the DEBUG-CALL Function 4.4.5 Sample Debugging Sessions 4.5 Stepper 4.5.1 Invoking the Stepper 4.5.2 Exiting the Stepper 4.5.3 Stepper Output 4.5.4 Using Stepper Commands 4.5.4.1 Arguments 4.5.4.2 Stepper Commands 4.5.5 Using Stepper Variables 4.5.5.1 * STEP-FORM * 4.5.5.2 * STEP-ENVIRONMENT * 4.5.5.3 Example Use of Stepper Variables 4.5.6 Sample Stepper Sessions 4.6 Tracer 4.6.1 Enabling the Tracer 4.6.2 Disabling the Tracer 4.6.3 Tracer Output 4.6.4 Tracer Options 4.6.4.1 Invoking the Debugger 4.6.4.2 Adding Information to Tracer Output 4.6.4.3 Invoking the Stepper 4.6.4.4 Removing Information from Tracer Output 4.6.4.5 Defining When a Function or Macro Is Traced 4.6.5 Tracer Variables 4.6.5.1 * TRACE-CALL * 4.6.5.2 * TRACE-VALUES * 4.7 The Editor Part II Using VAX LISP Facilities on the DECwindows Interface 5 The DECwindows Interface to VAX LISP 5.1 Invoking VAX LISP 5.2 Using the Listener 5.3 Using the Inspector 5.4 Running a Sample Function 5.5 Using the Editor 5.6 Using the Debugger 5.7 Exiting from VAX LISP 6 Starting LISP from DECwindows 6.1 Defining the Display System 6.1.1 Displaying LISP on DECwindows 6.1.2 Displaying LISP on a Terminal 6.2 Invoking LISP from DECwindows FileView 6.2.1 Invoking LISP with the LISP.EXE File 6.2.2 Invoking LISP with the DCL Command Item 6.3 Resuming LISP from DECwindows 6.4 Compiling a LISP File from DECwindows 7 The Listener 7.1 Entering LISP Forms 7.2 Exiting LISP from the Listener 7.3 Editing Text and Objects 7.3.1 Selecting Text and Objects 7.3.2 Moving Text and Objects to Another Location 7.3.3 VAX LISP Default Key Bindings 7.4 Working with Files 7.4.1 Loading a LISP File 7.4.2 Compiling a LISP File 7.4.3 Invoking the Editor on a LISP File 7.4.4 Saving the Text of the Transcript Region 7.4.5 Creating a LISP Suspended Image File 7.4.6 Recording Your Interactive LISP Session 7.5 Compiling a Function 7.6 Disassembling a Function 7.7 Using the EVAL Function 7.8 Invoking Other LISP Utilities 7.9 Interrupting a Program 7.10 Getting Help 7.10.1 Invoking Help on VAX LISP 7.10.2 Invoking Help on Screen Objects 7.10.3 Using the APROPOS and DESCRIBE Functions 8 Using the VAX LISP Editor in DECwindows 8.1 Introduction to the Editor 8.1.1 Invoking the Editor 8.1.1.1 Invoking the Editor from the Menus 8.1.1.2 Invoking the Editor Using a Command Line 8.1.2 Entering Text in the Editor 8.1.3 Using Editor Commands 8.1.4 Evaluating Work in the Editor 8.1.5 Saving Work in the Editor 8.1.6 Returning to LISP 8.1.7 Returning to the Editor 8.1.8 Exiting the Editor 8.2 Getting Help 8.2.1 Using the Help Key 8.2.2 Using the Help Menu 8.2.2.1 Help on Editor Objects 8.2.2.2 Help on Responses to Prompts 8.2.2.3 Help on Errors and Other Problems 8.3 Editing LISP Code 8.3.1 Using the Pointer 8.3.2 Cutting and Pasting Text 8.3.3 Finding and Replacing Text 8.3.4 Moving in LISP Code 8.3.5 Inserting Nongraphic Characters 8.3.6 Changing Case 8.3.7 Inserting a File or Buffer 8.4 Using Multiple Buffers and Windows 8.4.1 Introduction to Buffers and Windows 8.4.2 Creating New Buffers from Within the Editor 8.4.3 Working with Buffers 8.4.3.1 Saving Buffer Contents 8.4.3.2 Deleting Buffers 8.4.3.3 Buffer Name Conflicts 8.4.4 Manipulating Editor Windows 8.4.5 Moving Text Between Buffers 8.5 Recovering from Problems 8.6 Customizing the Editor 8.6.1 Binding Keys to Commands 8.6.1.1 Binding Within the Editor 8.6.1.2 Binding from the LISP Interpreter 8.6.1.3 Selecting a Key or Key Sequence 8.6.1.4 Key Binding Context and Shadowing 8.6.2 Keyboard Macros 9 Using the VAX LISP Inspector 9.1 Invoking the Inspector 9.1.1 Asynchronous Mode 9.1.2 Synchronous Mode 9.2 Exiting the Inspector 9.3 Inspecting Objects 9.3.1 Specifying Objects to Inspect 9.3.2 Managing Inspect Windows 9.3.2.1 Locking Inspect Windows 9.3.2.2 Unlocking Inspect Windows 9.3.2.3 Closing Inspect Windows 9.3.2.4 Removing Inspected Objects 9.3.3 Using the History Window 9.4 Modifying Objects 9.4.1 Using the Modify Menu Item 9.4.2 Using the Clipboard 9.5 Updating the Inspector Display 9.6 Returning Values 10 Using the Debugging Utilities from the DECwindows Interface 10.1 Control Variables 10.2 Control Stack 10.3 Break Loop 10.3.1 Invoking the Break Loop 10.3.2 Exiting the Break Loop 10.3.3 Using the Break Loop 10.4 Debugger 10.4.1 Invoking the Debugger from DECwindows 10.4.1.1 The Debug I/O Window 10.4.1.2 The Calling Stack Window 10.4.1.3 The Variable Bindings Window 10.4.1.4 The Debugger Commands Window 10.4.2 Exiting the Debugger 10.4.3 Using Debugger Commands 10.4.3.1 Arguments 10.5 Stepper 10.5.1 Invoking the Stepper 10.5.2 Stepping Through a Form 10.5.3 Exiting the Stepper 10.5.4 Stepper Output 10.5.5 Using Stepper Commands 10.6 Tracer 10.6.1 Enabling the Tracer 10.6.1.1 Enabling the Tracer from the Operations Menu 10.6.1.2 Enabling the Tracer from a Prompt 10.6.1.3 Clearing the Tracer 10.6.1.4 Disabling the Tracer 10.6.1.5 Disabling the Tracer from the Operations Menu 10.6.1.6 Disabling the Tracer from a Prompt 10.6.2 Tracer Output 10.6.3 Modifying Tracer Options from the Dialog Box 10.6.3.1 Invoking the Debugger from the Trace Options Dialog Box 10.6.3.2 Invoking the Stepper from the Trace Options Dialog Box 10.6.3.3 Removing Information from Tracer Output from the Trace Options Dialog Box 10.6.3.4 Adding Information to Tracer Output from the Trace Options Dialog Box 10.6.3.5 Defining When a Function or Macro Is Traced from the Trace Options Dialog Box 10.6.4 Modifying Tracer Options in the Call to the TRACE Macro A Using DECwindows A.1 Using Windows A.2 Using the Mouse A.3 Starting a Session A.4 Managing Windows A.4.1 Selecting Windows A.4.2 Changing the Size of Windows A.4.3 Shrinking Windows to Icons A.4.4 Expanding Icons to Windows A.4.5 Moving Windows A.4.6 Stacking Overlapping Windows A.4.6.1 Making Stacked Windows Stick in Place A.4.6.2 Releasing Windows Locked in the Stacking Order A.4.7 Customizing Your Windows A.4.7.1 Changing Window Animation A.4.7.2 Preventing Windows from Taking Input Focus A.5 Choosing Items from Pull-Down Menus A.6 Choosing Items from Submenus A.7 Choosing Items from Pop-Up Menus A.8 Choosing Items from Option Menus A.9 Supplying Information in Dialog Boxes A.9.1 Moving and Changing Settings in a Dialog Box A.9.2 Saving Your Settings A.9.3 Making Selections from List Boxes A.10 Scrolling A.11 Editing Text A.11.1 Selecting Text A.11.2 Copying Text A.11.3 Moving Text Between Windows A.11.4 Deleting Text with Pending Delete A.11.5 Editing Text in Dialog Boxes A.12 Composing Special Characters A.13 Getting Help A.13.1 Invoking Help A.13.2 Navigating in Help A.13.3 Searching Help for Titles and Keywords A.13.4 Exiting from Help A.14 Putting a Session on Hold A.15 Ending a Session B Performance Hints B.1 Data Structures B.1.1 Integers B.1.2 Floating-Point Numbers B.1.3 Ratios B.1.4 Complex Numbers B.1.5 Characters B.1.6 Symbols B.1.7 Lists and Vectors B.1.8 Strings, General Vectors, and Bit Vectors B.1.9 Hash Tables B.1.10 Functions B.2 Declarations B.3 Program Structure B.4 Compiler Requirements C Customizing DECwindows from VAX LISP C.1 Customizable Attributes C.1.1 Common Attributes C.1.2 Specific Attributes and Restrictions C.1.2.1 Inspector Attributes C.1.2.2 Listener Attributes C.1.2.3 Debugger Attributes C.1.2.4 Trace Attributes C.1.2.5 Editor Restrictions C.2 Getting Information on Fonts LIST-FONTS function C.3 Getting and Modifying Attributes CUSTOMIZATION function C.4 Saving Customizations SAVE-CUSTOMIZATIONS function C.5 Recalling Customizations LOAD-CUSTOMIZATIONS function D Using the "EMACS" Editor Style D.1 Introduction to the Editor D.2 Activating the "EMACS" Style D.2.1 Activating "EMACS" as a Minor Style D.2.2 Making "EMACS" the Major Style D.3 "EMACS" Style Key Bindings E Editor Commands and Key Bindings E.1 Editor Command Descriptions E.2 Editor Key Bindings EXAMPLES 5-1 Defining a LISP Function FIGURES 3-1 Invoking the Editor 3-2 The Editor Screen with Help Message 3-3 Entering Commands at the Editor Prompt 3-4 Using APROPOS in the Editor 3-5 Numeric Keypad 3-6 The Editor with Two Buffers Open 3-7 Listing Buffers in the Editor 5-1 Copying a Sample Source File 5-2 Invoking LISP 5-3 Listener Window 5-4 Evaluating a LISP Form 5-5 Loading a LISP Source File 5-6 Inspecting a Structure 5-7 Choosing the Inspect Menu Item 5-8 Inspecting a List 5-9 Inspector History Window 5-10 Running a LISP Function 5-11 Choosing the ED Function 5-12 Editing a File 5-13 Basic Editing Commands 5-14 Running the PRINT-RECIPE Function 5-15 Debugging Dialog Box 5-16 Debugging Windows 5-17 Using the DOWN Command 5-18 Stepping Through a Function 5-19 Exiting from VAX LISP 6-1 DECwindows FileView-Run Dialog Box 6-2 DECwindows FileView-Work in Progress Dialog Box 7-1 Listener Menus 7-2 Listener Window 7-3 File Selection Box 7-4 Compile-File File Select Box 7-5 Save As Dialog Box 7-6 Apropos Dialog Box 7-7 Describe Dialog Box 8-1 Editor Menus 8-2 Editor Window with Two Buffers 8-3 Editor Window with Two Buffers 8-4 Apropos Display 8-5 List Buffers Display 9-1 Inspector Menus 9-2 Invoking the Inspector 9-3 Inspect and History Windows 9-4 Inspecting a Component of an Inspected Object 9-5 Inspecting a Structure 9-6 Inspector History Window 9-7 Modify Dialog Box 9-8 Inspect Windows Before Updating 9-9 Inspect Windows After Updating 9-10 Returning a Value from the Inspector 10-1 Fatal Error Caution Box 10-2 Continuable Error Caution Box 10-3 Debugging Utilities Pull-Down Menus 10-4 Defining a Variable 10-5 Invoking the Break Loop 10-6 Debug I/O, Calling Stack, Variable Bindings, and Debugger Commands Windows 10-7 The Quit Command Confirmation Box 10-8 Invoking the Stepper 10-9 Stepper Window Display 10-10 Trace Window 10-11 Trace Options Dialog Box TABLES 1-1 File Specification Defaults 2-1 Keys Used in Line Editing 2-2 Control Characters 2-3 DCL LISP Command Qualifiers 2-4 DCL LISP Command Qualifier Modes 3-1 General-Purpose Commands and Key Bindings 3-2 Editing Commands and Key Bindings 3-3 Commands for Manipulating Buffers and Windows 3-4 Characters Generated by Keys 3-5 Commands for Customizing the Editor 4-1 Debugging Functions and Macros 4-2 Debugger Commands 4-3 Debugger Command Modifiers 4-4 Stepper Commands 7-1 VAX LISP Default Key Bindings 8-1 Editor Default Pointer Bindings 8-2 Characters Generated by Keys 9-1 Components of Inspectable Data Types 9-2 Inspector History Status Flags 10-1 Debugging Functions and Macros 10-2 Debugger Commands 10-3 Debugger Command Modifiers 10-4 Stepper Commands C-1 Object Keywords for DECW-UTILS:CUSTOMIZATION Function C-2 Attribute Keywords for Customization Functions D-1 Commands for Manipulating Buffers and Windows D-2 "EMACS" Style Key Bindings E-1 Editor Commands and Key Bindings E-2 Editor Key Bindings