How emacs-mirror/emacs works
GNU Emacs is an extensible, customizable, self-documenting real-time display editor. A user enters commands through a terminal or graphical interface; Emacs evaluates commands and editing operations against buffers, then redisplays the result. The README identifies the C runtime and primitives in src, most higher-level functionality in Lisp, and input methods in leim; those latter directories are not present in the supplied tree, so they are described only where the README supports them. The graph emphasizes runtime stages and major capabilities, not every platform port or utility.
Main entry points: cmds.c Command execution · eval.c Lisp evaluator · buffer.c Buffer state · frame.c Frames
Components 24
User interaction
- Input dispatch
src/keyboard.c - Command execution
src/cmds.c - Minibuffer
src/minibuf.c - Input methods
Editor runtime
- Emacs startup
src/emacs.c - Lisp reader
src/lread.c - Lisp evaluator
src/eval.c - Bytecode runtime
src/bytecode.c - Lisp extensions
Editing services
- Buffer state
src/buffer.c - File operations
src/fileio.c - Search and replace
src/search.c - Syntax analysis
src/syntax.c - Undo history
src/undo.c
Display and platforms
- Redisplay engine
src/xdisp.c - Window layout
src/window.c - Frames
src/frame.c - Terminal backend
src/terminal.c - Android interface
src/androidterm.c - Font and text
src/font.c
External integration
- Process control
src/process.c - Emacs client
lib-src/emacsclient.c
Other components
- Editor user
- External programs
Connections 24
- Editor user → Input dispatch: enters commands
- Input dispatch → Command execution: dispatches
- Command execution → Lisp evaluator: invokes Lisp
- Lisp evaluator → Lisp reader: reads forms
- Lisp evaluator → Bytecode runtime: runs bytecode
- Command execution → Buffer state: edits
- Command execution → Minibuffer: requests input
- Command execution → File operations: accesses files
- Command execution → Search and replace: searches text
- Command execution → Syntax analysis: queries syntax
- Command execution → Undo history: records edits
- File operations → Buffer state: loads and saves
- Search and replace → Buffer state: matches and replaces
- Buffer state → Redisplay engine: supplies text
- Redisplay engine → Window layout: lays out content
- Window layout → Frames: arranges windows
- Frames → Terminal backend: renders through
- Terminal backend → Font and text: uses fonts
- Frames → Android interface: platform interface
- Process control → External programs: starts processes
- Emacs client → External programs: communicates with server
- Input methods → Input dispatch: provides character input
- Lisp extensions → Lisp evaluator: extends behavior
- Emacs startup → Lisp reader: loads Lisp