Emacs Lisp
Menu
- Introduction
- Lisp Data Types
- Numbers
- Strings and Characters
- Lists
- Sequences, Arrays, and Vectors
- Records
- Hash Tables
- Symbols
- Evaluation
- Control Structures
- Variables
- Functions
- Macros
- Customization Settings
- Loading
- Byte Compilation
- Compilation of Lisp to Native Code
- Debugging Lisp Programs
- Reading and Printing Lisp Objects
- Minibuffers
- Command Loop
- Keymaps
- Major and Minor Modes
- Documentation
- Files
- Backups and Auto-Saving
- Buffers
- Windows
- Frames
- Positions
- Markers
- Text
- Non-ASCII Characters
- Searching and Matching
- Syntax Tables
- Abbrevs and Abbrev Expansion
- Threads
- Processes
- Emacs Display
- Operating System Interface
- Preparing Lisp code for distribution
- Emacs 27 Antinews
- GNU Free Documentation License
- GNU General Public License
- Tips and Conventions
- GNU Emacs Internals
- Standard Errors
- Standard Keymaps
- Standard Hooks
- Index
- Caveats
- Lisp History
- Conventions
- Version Information
- Acknowledgments
- Some Terms
nilandt- Evaluation Notation
- Printing Notation
- Error Messages
- Buffer Text Notation
- Format of Descriptions
- A Sample Function Description
- A Sample Variable Description
- Printed Representation and Read Syntax
- Special Read Syntax
- Comments
- Programming Types
- Editing Types
- Read Syntax for Circular Objects
- Type Predicates
- Equality Predicates
- Mutability
- Integer Type
- Floating-Point Type
- Character Type
- Symbol Type
- Sequence Types
- Cons Cell and List Types
- Array Type
- String Type
- Vector Type
- Char-Table Type
- Bool-Vector Type
- Hash Table Type
- Function Type
- Macro Type
- Primitive Function Type
- Byte-Code Function Type
- Record Type
- Type Descriptors
- Autoload Type
- Finalizer Type
- Basic Char Syntax
- General Escape Syntax
- Control-Character Syntax
- Meta-Character Syntax
- Other Character Modifier Bits
- Drawing Lists as Box Diagrams
- Dotted Pair Notation
- Association List Type
- Syntax for Strings
- Non-ASCII Characters in Strings
- Nonprinting Characters in Strings
- Text Properties in Strings
- Buffer Type
- Marker Type
- Window Type
- Frame Type
- Terminal Type
- Window Configuration Type
- Frame Configuration Type
- Process Type
- Thread Type
- Mutex Type
- Condition Variable Type
- Stream Type
- Keymap Type
- Overlay Type
- Font Type
- Integer Basics
- Floating-Point Basics
- Type Predicates for Numbers
- Comparison of Numbers
- Numeric Conversions
- Arithmetic Operations
- Rounding Operations
- Bitwise Operations on Integers
- Standard Mathematical Functions
- Random Numbers
- String and Character Basics
- Predicates for Strings
- Creating Strings
- Modifying Strings
- Comparison of Characters and Strings
- Conversion of Characters and Strings
- Formatting Strings
- Case Conversion in Lisp
- The Case Table
- Lists and Cons Cells
- Predicates on Lists
- Accessing Elements of Lists
- Building Cons Cells and Lists
- Modifying List Variables
- Modifying Existing List Structure
- Using Lists as Sets
- Association Lists
- Property Lists
- Altering List Elements with
setcar - Altering the CDR of a List
- Functions that Rearrange Lists
- Property Lists and Association Lists
- Property Lists Outside Symbols
- Sequences
- Arrays
- Functions that Operate on Arrays
- Vectors
- Functions for Vectors
- Char-Tables
- Bool-vectors
- Managing a Fixed-Size Ring of Objects
- Record Functions
- Backward Compatibility
- Creating Hash Tables
- Hash Table Access
- Defining Hash Comparisons
- Other Hash Table Functions
- Symbol Components
- Defining Symbols
- Creating and Interning Symbols
- Symbol Properties
- Accessing Symbol Properties
- Standard Symbol Properties
- Introduction to Evaluation
- Kinds of Forms
- Quoting
- Backquote
- Eval
- Deferred and Lazy Evaluation
- Self-Evaluating Forms
- Symbol Forms
- Classification of List Forms
- Symbol Function Indirection
- Evaluation of Function Forms
- Lisp Macro Evaluation
- Special Forms
- Autoloading
- Sequencing
- Conditionals
- Constructs for Combining Conditions
- Pattern-Matching Conditional
- Iteration
- Generators
- Nonlocal Exits
- Explicit Nonlocal Exits:
catchandthrow - Examples of
catchandthrow - Errors
- Cleaning Up from Nonlocal Exits
- How to Signal an Error
- How Emacs Processes Errors
- Writing Code to Handle Errors
- Error Symbols and Condition Names
- Global Variables
- Variables that Never Change
- Local Variables
- When a Variable is Void
- Defining Global Variables
- Tips for Defining Variables Robustly
- Accessing Variable Values
- Setting Variable Values
- Running a function when a variable is changed.
- Scoping Rules for Variable Bindings
- Buffer-Local Variables
- File Local Variables
- Directory Local Variables
- Connection Local Variables
- Variable Aliases
- Variables with Restricted Values
- Generalized Variables
- Dynamic Binding
- Proper Use of Dynamic Binding
- Lexical Binding
- Using Lexical Binding
- Converting to Lexical Binding
- Introduction to Buffer-Local Variables
- Creating and Deleting Buffer-Local Bindings
- The Default Value of a Buffer-Local Variable
- The
setfMacro - Defining new
setfforms - What Is a Function?
- Lambda Expressions
- Naming a Function
- Defining Functions
- Calling Functions
- Mapping Functions
- Anonymous Functions
- Generic Functions
- Accessing Function Cell Contents
- Closures
- Advising Emacs Lisp Functions
- Declaring Functions Obsolete
- Inline Functions
- The
declareForm - Telling the Compiler that a Function is Defined
- Determining whether a Function is Safe to Call
- Other Topics Related to Functions
- Components of a Lambda Expression
- A Simple Lambda Expression Example
- Features of Argument Lists
- Documentation Strings of Functions
- Primitives to manipulate advices
- Advising Named Functions
- Ways to compose advice
- Adapting code using the old defadvice
- A Simple Example of a Macro
- Expansion of a Macro Call
- Macros and Byte Compilation
- Defining Macros
- Common Problems Using Macros
- Indenting Macros
- Wrong Time
- Evaluating Macro Arguments Repeatedly
- Local Variables in Macro Expansions
- Evaluating Macro Arguments in Expansion
- How Many Times is the Macro Expanded?
- Common Item Keywords
- Defining Customization Groups
- Defining Customization Variables
- Customization Types
- Applying Customizations
- Custom Themes
- Simple Types
- Composite Types
- Splicing into Lists
- Type Keywords
- Defining New Types
- How Programs Do Loading
- Load Suffixes
- Library Search
- Loading Non-ASCII Characters
- Autoload
- Repeated Loading
- Features
- Which File Defined a Certain Symbol
- Unloading
- Hooks for Loading
- Emacs Dynamic Modules
- Performance of Byte-Compiled Code
- Byte-Compilation Functions
- Documentation Strings and Compilation
- Dynamic Loading of Individual Functions
- Evaluation During Compilation
- Compiler Errors
- Byte-Code Function Objects
- Disassembled Byte-Code
- Native-Compilation Functions
- Native-Compilation Variables
- The Lisp Debugger
- Edebug
- Debugging Invalid Lisp Syntax
- Test Coverage
- Profiling
- Entering the Debugger on an Error
- Debugging Infinite Loops
- Entering the Debugger on a Function Call
- Entering the debugger when a variable is modified
- Explicit Entry to the Debugger
- Using the Debugger
- Backtraces
- Debugger Commands
- Invoking the Debugger
- Internals of the Debugger
- Using Edebug
- Instrumenting for Edebug
- Edebug Execution Modes
- Jumping
- Miscellaneous Edebug Commands
- Breaks
- Trapping Errors
- Edebug Views
- Evaluation
- Evaluation List Buffer
- Printing in Edebug
- Trace Buffer
- Coverage Testing
- The Outside Context
- Edebug and Macros
- Edebug Options
- Edebug Breakpoints
- Global Break Condition
- Source Breakpoints
- Checking Whether to Stop
- Edebug Display Update
- Edebug Recursive Edit
- Instrumenting Macro Calls
- Specification List
- Backtracking in Specifications
- Specification Examples
- Excess Open Parentheses
- Excess Close Parentheses
- Introduction to Reading and Printing
- Input Streams
- Input Functions
- Output Streams
- Output Functions
- Variables Affecting Output
- Introduction to Minibuffers
- Reading Text Strings with the Minibuffer
- Reading Lisp Objects with the Minibuffer
- Minibuffer History
- Initial Input
- Completion
- Yes-or-No Queries
- Asking Multiple-Choice Questions
- Reading a Password
- Minibuffer Commands
- Minibuffer Windows
- Minibuffer Contents
- Recursive Minibuffers
- Inhibiting Interaction
- Minibuffer Miscellany
- Basic Completion Functions
- Completion and the Minibuffer
- Minibuffer Commands that Do Completion
- High-Level Completion Functions
- Reading File Names
- Completion Variables
- Programmed Completion
- Completion in Ordinary Buffers
- Command Loop Overview
- Defining Commands
- Interactive Call
- Distinguish Interactive Calls
- Information from the Command Loop
- Adjusting Point After Commands
- Input Events
- Reading Input
- Special Events
- Waiting for Elapsed Time or Input
- Quitting
- Prefix Command Arguments
- Recursive Editing
- Disabling Commands
- Command History
- Keyboard Macros
- Using
interactive - Code Characters for
interactive - Examples of Using
interactive - Specifying Modes For Commands
- Select among Command Alternatives
- Keyboard Events
- Function Keys
- Mouse Events
- Click Events
- Drag Events
- Button-Down Events
- Repeat Events
- Motion Events
- Focus Events
- Miscellaneous System Events
- Event Examples
- Classifying Events
- Accessing Mouse Events
- Accessing Scroll Bar Events
- Putting Keyboard Events in Strings
- Key Sequence Input
- Reading One Event
- Modifying and Translating Input Events
- Invoking the Input Method
- Quoted Character Input
- Miscellaneous Event Input Features
- Key Sequences
- Keymap Basics
- Format of Keymaps
- Creating Keymaps
- Inheritance and Keymaps
- Prefix Keys
- Active Keymaps
- Searching the Active Keymaps
- Controlling the Active Keymaps
- Key Lookup
- Functions for Key Lookup
- Changing Key Bindings
- Remapping Commands
- Keymaps for Translating Sequences of Events
- Commands for Binding Keys
- Scanning Keymaps
- Menu Keymaps
- Defining Menus
- Menus and the Mouse
- Menus and the Keyboard
- Menu Example
- The Menu Bar
- Tool bars
- Modifying Menus
- Easy Menu
- Simple Menu Items
- Extended Menu Items
- Menu Separators
- Alias Menu Items
- Hooks
- Major Modes
- Minor Modes
- Mode Line Format
- Imenu
- Font Lock Mode
- Automatic Indentation of code
- Desktop Save Mode
- Running Hooks
- Setting Hooks
- Major Mode Conventions
- How Emacs Chooses a Major Mode
- Getting Help about a Major Mode
- Defining Derived Modes
- Basic Major Modes
- Mode Hooks
- Tabulated List mode
- Generic Modes
- Major Mode Examples
- Conventions for Writing Minor Modes
- Keymaps and Minor Modes
- Defining Minor Modes
- Mode Line Basics
- The Data Structure of the Mode Line
- The Top Level of Mode Line Control
- Variables Used in the Mode Line
%-Constructs in the Mode Line- Properties in the Mode Line
- Window Header Lines
- Emulating Mode Line Formatting
- Font Lock Basics
- Search-based Fontification
- Customizing Search-Based Fontification
- Other Font Lock Variables
- Levels of Font Lock
- Precalculated Fontification
- Faces for Font Lock
- Syntactic Font Lock
- Multiline Font Lock Constructs
- Font Lock Multiline
- Region to Fontify after a Buffer Change
- Simple Minded Indentation Engine
- SMIE Setup and Features
- Operator Precedence Grammars
- Defining the Grammar of a Language
- Defining Tokens
- Living With a Weak Parser
- Specifying Indentation Rules
- Helper Functions for Indentation Rules
- Sample Indentation Rules
- Customizing Indentation
- Documentation Basics
- Access to Documentation Strings
- Substituting Key Bindings in Documentation
- Text Quoting Style
- Describing Characters for Help Messages
- Help Functions
- Visiting Files
- Saving Buffers
- Reading from Files
- Writing to Files
- File Locks
- Information about Files
- Changing File Names and Attributes
- File Names
- Contents of Directories
- Creating, Copying and Deleting Directories
- Making Certain File Names "Magic"
- File Format Conversion
- Functions for Visiting Files
- Subroutines of Visiting
- Testing Accessibility
- Distinguishing Kinds of Files
- Truenames
- File Attributes
- Extended File Attributes
- Locating Files in Standard Places
- File Name Components
- Absolute and Relative File Names
- Directory Names
- Functions that Expand Filenames
- Generating Unique File Names
- File Name Completion
- Standard File Names
- Overview
- Round-Trip Specification
- Piecemeal Specification
- Backup Files
- Auto-Saving
- Reverting
- Making Backup Files
- Backup by Renaming or by Copying?
- Making and Deleting Numbered Backup Files
- Naming Backup Files
- Buffer Basics
- The Current Buffer
- Buffer Names
- Buffer File Name
- Buffer Modification
- Buffer Modification Time
- Read-Only Buffers
- The Buffer List
- Creating Buffers
- Killing Buffers
- Indirect Buffers
- Swapping Text Between Two Buffers
- The Buffer Gap
- Basic Concepts of Emacs Windows
- Windows and Frames
- Selecting Windows
- Window Sizes
- Resizing Windows
- Preserving Window Sizes
- Splitting Windows
- Deleting Windows
- Recombining Windows
- Cyclic Ordering of Windows
- Buffers and Windows
- Switching to a Buffer in a Window
- Displaying a Buffer in a Suitable Window
- Window History
- Dedicated Windows
- Quitting Windows
- Side Windows
- Atomic Windows
- Windows and Point
- The Window Start and End Positions
- Textual Scrolling
- Vertical Fractional Scrolling
- Horizontal Scrolling
- Coordinates and Windows
- Mouse Window Auto-selection
- Window Configurations
- Window Parameters
- Hooks for Window Scrolling and Changes
- Choosing a Window for Displaying a Buffer
- Action Functions for Buffer Display
- Action Alists for Buffer Display
- Additional Options for Displaying Buffers
- Precedence of Action Functions
- The Zen of Buffer Display
- Displaying Buffers in Side Windows
- Side Window Options and Functions
- Frame Layouts with Side Windows
- Creating Frames
- Multiple Terminals
- Frame Geometry
- Frame Parameters
- Terminal Parameters
- Frame Titles
- Deleting Frames
- Finding All Frames
- Minibuffers and Frames
- Input Focus
- Visibility of Frames
- Raising, Lowering and Restacking Frames
- Frame Configurations
- Child Frames
- Mouse Tracking
- Mouse Position
- Pop-Up Menus
- Dialog Boxes
- Pointer Shape
- Window System Selections
- Drag and Drop
- Color Names
- Text Terminal Colors
- X Resources
- Display Feature Testing
- Frame Layout
- Frame Font
- Frame Position
- Frame Size
- Implied Frame Resizing
- Access to Frame Parameters
- Initial Frame Parameters
- Window Frame Parameters
- Geometry
- Basic Parameters
- Position Parameters
- Size Parameters
- Layout Parameters
- Buffer Parameters
- Frame Interaction Parameters
- Mouse Dragging Parameters
- Window Management Parameters
- Cursor Parameters
- Font and Color Parameters
- Point
- Motion
- Excursions
- Narrowing
- Motion by Characters
- Motion by Words
- Motion to an End of the Buffer
- Motion by Text Lines
- Motion by Screen Lines
- Moving over Balanced Expressions
- Skipping Characters
- Overview of Markers
- Predicates on Markers
- Functions that Create Markers
- Information from Markers
- Marker Insertion Types
- Moving Marker Positions
- The Mark
- The Region
- Examining Text Near Point
- Examining Buffer Contents
- Comparing Text
- Inserting Text
- User-Level Insertion Commands
- Deleting Text
- User-Level Deletion Commands
- The Kill Ring
- Undo
- Maintaining Undo Lists
- Filling
- Margins for Filling
- Adaptive Fill Mode
- Auto Filling
- Sorting Text
- Counting Columns
- Indentation
- Case Changes
- Text Properties
- Substituting for a Character Code
- Registers
- Transposition of Text
- Dealing With Compressed Data
- Base 64 Encoding
- Checksum/Hash
- GnuTLS Cryptography
- Parsing HTML and XML
- Atomic Change Groups
- Change Hooks
- Kill Ring Concepts
- Functions for Killing
- Yanking
- Functions for Yanking
- Low-Level Kill Ring
- Internals of the Kill Ring
- Indentation Primitives
- Indentation Controlled by Major Mode
- Indenting an Entire Region
- Indentation Relative to Previous Lines
- Adjustable Tab Stops
- Indentation-Based Motion Commands
- Examining Text Properties
- Changing Text Properties
- Text Property Search Functions
- Properties with Special Meanings
- Formatted Text Properties
- Stickiness of Text Properties
- Lazy Computation of Text Properties
- Defining Clickable Text
- Defining and Using Fields
- Why Text Properties are not Intervals
- Document Object Model
- Text Representations
- Disabling Multibyte Characters
- Converting Text Representations
- Selecting a Representation
- Character Codes
- Character Properties
- Character Sets
- Scanning for Character Sets
- Translation of Characters
- Coding Systems
- Input Methods
- Locales
- Basic Concepts of Coding Systems
- Encoding and I/O
- Coding Systems in Lisp
- User-Chosen Coding Systems
- Default Coding Systems
- Specifying a Coding System for One Operation
- Explicit Encoding and Decoding
- Terminal I/O Encoding
- Searching for Strings
- Searching and Case
- Regular Expressions
- Regular Expression Searching
- POSIX Regular Expression Searching
- The Match Data
- Search and Replace
- Standard Regular Expressions Used in Editing
- Syntax of Regular Expressions
- Complex Regexp Example
- The
rxStructured Regexp Notation - Regular Expression Functions
- Problems with Regular Expressions
- Special Characters in Regular Expressions
- Character Classes
- Backslash Constructs in Regular Expressions
- Replacing the Text that Matched
- Simple Match Data Access
- Accessing the Entire Match Data
- Saving and Restoring the Match Data
- Syntax Table Concepts
- Syntax Descriptors
- Syntax Table Functions
- Syntax Properties
- Motion and Syntax
- Parsing Expressions
- Syntax Table Internals
- Categories
- Table of Syntax Classes
- Syntax Flags
- Motion Commands Based on Parsing
- Finding the Parse State for a Position
- Parser State
- Low-Level Parsing
- Parameters to Control Parsing
- Abbrev Tables
- Defining Abbrevs
- Saving Abbrevs in Files
- Looking Up and Expanding Abbreviations
- Standard Abbrev Tables
- Abbrev Properties
- Abbrev Table Properties
- Basic Thread Functions
- Mutexes
- Condition Variables
- The Thread List
- Functions that Create Subprocesses
- Shell Arguments
- Creating a Synchronous Process
- Creating an Asynchronous Process
- Deleting Processes
- Process Information
- Sending Input to Processes
- Sending Signals to Processes
- Receiving Output from Processes
- Sentinels: Detecting Process Status Changes
- Querying Before Exit
- Accessing Other Processes
- Transaction Queues
- Network Connections
- Network Servers
- Datagrams
- Low-Level Network Access
- Misc Network Facilities
- Communicating with Serial Ports
- Packing and Unpacking Byte Arrays
- Process Buffers
- Process Filter Functions
- Decoding Process Output
- Accepting Output from Processes
make-network-process- Network Options
- Testing Availability of Network Features
- Describing Data Layout
- Functions to Unpack and Pack Bytes
- Advanced data layout specifications
- Refreshing the Screen
- Forcing Redisplay
- Truncation
- The Echo Area
- Reporting Warnings
- Invisible Text
- Selective Display
- Temporary Displays
- Overlays
- Size of Displayed Text
- Line Height
- Faces
- Fringes
- Scroll Bars
- Window Dividers
- The
displayProperty - Images
- Buttons
- Abstract Display
- Blinking Parentheses
- Character Display
- Beeping
- Window Systems
- Tooltips
- Bidirectional Display
- Displaying Messages in the Echo Area
- Reporting Operation Progress
- Logging Messages in
*Messages* - Echo Area Customization
- Warning Basics
- Warning Variables
- Warning Options
- Delayed Warnings
- Managing Overlays
- Overlay Properties
- Searching for Overlays
- Face Attributes
- Defining Faces
- Face Attribute Functions
- Displaying Faces
- Face Remapping
- Functions for Working with Faces
- Automatic Face Assignment
- Basic Faces
- Font Selection
- Looking Up Fonts
- Fontsets
- Low-Level Font Representation
- Fringe Size and Position
- Fringe Indicators
- Fringe Cursors
- Fringe Bitmaps
- Customizing Fringe Bitmaps
- The Overlay Arrow
- Display Specs That Replace The Text
- Specified Spaces
- Pixel Specification for Spaces
- Other Display Specifications
- Displaying in the Margins
- Image Formats
- Image Descriptors
- XBM Images
- XPM Images
- ImageMagick Images
- Other Image Types
- Defining Images
- Showing Images
- Multi-Frame Images
- Image Cache
- Button Properties
- Button Types
- Making Buttons
- Manipulating Buttons
- Button Buffer Commands
- Abstract Display Functions
- Abstract Display Example
- Usual Display Conventions
- Display Tables
- Active Display Table
- Glyphs
- Glyphless Character Display
- Starting Up Emacs
- Getting Out of Emacs
- Operating System Environment
- User Identification
- Time of Day
- Time Conversion
- Parsing and Formatting Times
- Processor Run time
- Time Calculations
- Timers for Delayed Execution
- Idle Timers
- Terminal Input
- Terminal Output
- Sound Output
- Operating on X11 Keysyms
- Batch Mode
- Session Management
- Desktop Notifications
- Notifications on File Changes
- Dynamically Loaded Libraries
- Security Considerations
- Summary: Sequence of Actions at Startup
- The Init File
- Terminal-Specific Initialization
- Command-Line Arguments
- Killing Emacs
- Suspending Emacs
- Input Modes
- Recording Input
- Packaging Basics
- Simple Packages
- Multi-file Packages
- Creating and Maintaining Package Archives
- Emacs Lisp Coding Conventions
- Key Binding Conventions
- Emacs Programming Tips
- Tips for Making Compiled Code Fast
- Tips for Avoiding Compiler Warnings
- Tips for Documentation Strings
- Tips on Writing Comments
- Conventional Headers for Emacs Libraries
- Building Emacs
- Pure Storage
- Garbage Collection
- Stack-allocated Objects
- Memory Usage
- C Dialect
- Writing Emacs Primitives
- Writing Dynamically-Loaded Modules
- Object Internals
- C Integer Types
- Module Initialization Code
- Writing Module Functions
- Conversion Between Lisp and Module Values
- Miscellaneous Convenience Functions for Modules
- Nonlocal Exits in Modules
- Buffer Internals
- Window Internals
- Process Internals