elisp.pdf

(5078 KB) Pobierz
698193098 UNPDF
GNU Emacs Lisp Reference Manual
For Emacs Version 23.3
Revision 3.0, July 2009
by Bil Lewis, Dan LaLiberte, Richard Stallman
and the GNU Manual Group
 
This is edition 3.0 of the GNU Emacs Lisp Reference Manual,
corresponding to Emacs version 23.3.
Copyright c 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003,
2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document under
the terms of the GNU Free Documentation License, Version 1.3 or any later
version published by the Free Software Foundation; with the Invariant Sections
being “GNU General Public License,” with the Front-Cover texts being “A
GNU Manual,” and with the Back-Cover Texts as in (a) below. A copy of the
license is included in the section entitled “GNU Free Documentation License.”
(a) The FSF’s Back-Cover Text is: “You have the freedom to copy and modify
this GNU manual. Buying copies from the FSF supports it in developing GNU
and promoting software freedom.”
Published by the Free Software Foundation
51 Franklin St, Fifth Floor
Boston, MA 02110-1301
USA
ISBN 1-882114-74-4
Cover art by Etienne Suvasa.
i
Short Contents
1 Introduction ::::::::::::::::::::::::::::::::::::::::: 1
2 Lisp Data Types :::::::::::::::::::::::::::::::::::::: 8
3 Numbers ::::::::::::::::::::::::::::::::::::::::::: 33
4 Strings and Characters :::::::::::::::::::::::::::::::: 48
5 Lists ::::::::::::::::::::::::::::::::::::::::::::::: 63
6 Sequences, Arrays, and Vectors ::::::::::::::::::::::::: 87
7 Hash Tables ::::::::::::::::::::::::::::::::::::::::: 97
8 Symbols ::::::::::::::::::::::::::::::::::::::::::: 102
9 Evaluation ::::::::::::::::::::::::::::::::::::::::: 110
10 Control Structures :::::::::::::::::::::::::::::::::: 119
11 Variables :::::::::::::::::::::::::::::::::::::::::: 136
12 Functions :::::::::::::::::::::::::::::::::::::::::: 161
13 Macros :::::::::::::::::::::::::::::::::::::::::::: 179
14 Writing Customization Deinitions :::::::::::::::::::::: 188
15 Loading ::::::::::::::::::::::::::::::::::::::::::: 205
16 Byte Compilation ::::::::::::::::::::::::::::::::::: 219
17 Advising Emacs Lisp Functions :::::::::::::::::::::::: 230
18 Debugging Lisp Programs :::::::::::::::::::::::::::: 241
19 Reading and Printing Lisp Objects ::::::::::::::::::::: 272
20 Minibufers :::::::::::::::::::::::::::::::::::::::: 283
21 Command Loop :::::::::::::::::::::::::::::::::::: 312
22 Keymaps :::::::::::::::::::::::::::::::::::::::::: 356
23 Major and Minor Modes :::::::::::::::::::::::::::::: 392
24 Documentation ::::::::::::::::::::::::::::::::::::: 445
25 Files :::::::::::::::::::::::::::::::::::::::::::::: 454
26 Backups and Auto-Saving :::::::::::::::::::::::::::: 494
27 Bufers :::::::::::::::::::::::::::::::::::::::::::: 504
28 Windows :::::::::::::::::::::::::::::::::::::::::: 521
29 Frames :::::::::::::::::::::::::::::::::::::::::::: 557
30 Positions :::::::::::::::::::::::::::::::::::::::::: 591
31 Markers ::::::::::::::::::::::::::::::::::::::::::: 604
32 Text :::::::::::::::::::::::::::::::::::::::::::::: 613
33 Non-ASCII Characters ::::::::::::::::::::::::::::::: 672
34 Searching and Matching :::::::::::::::::::::::::::::: 698
35 Syntax Tables :::::::::::::::::::::::::::::::::::::: 722
ii
36 Abbrevs and Abbrev Expansion :::::::::::::::::::::::: 737
37 Processes :::::::::::::::::::::::::::::::::::::::::: 744
38 Emacs Display :::::::::::::::::::::::::::::::::::::: 785
39 Operating System Interface ::::::::::::::::::::::::::: 865
A Emacs 22 Antinews :::::::::::::::::::::::::::::::::: 894
B GNU Free Documentation License :::::::::::::::::::::: 896
C GNU General Public License :::::::::::::::::::::::::: 904
D Tips and Conventions :::::::::::::::::::::::::::::::: 915
E GNU Emacs Internals :::::::::::::::::::::::::::::::: 928
F Standard Errors :::::::::::::::::::::::::::::::::::: 949
G Bufer-Local Variables ::::::::::::::::::::::::::::::: 953
H Standard Keymaps :::::::::::::::::::::::::::::::::: 957
I Standard Hooks :::::::::::::::::::::::::::::::::::: 961
Index ::::::::::::::::::::::::::::::::::::::::::::::::: 966
iii
Table of Contents
1 Introduction ::::::::::::::::::::::::::::::::::::: 1
1.1 Caveats :::::::::::::::::::::::::::::::::::::::::::::::::::::::: 1
1.2 Lisp History ::::::::::::::::::::::::::::::::::::::::::::::::::: 1
1.3 Conventions:::::::::::::::::::::::::::::::::::::::::::::::::::: 2
1.3.1 Some Terms::::::::::::::::::::::::::::::::::::::::::::::: 2
1.3.2 nil and t ::::::::::::::::::::::::::::::::::::::::::::::::: 2
1.3.3 Evaluation Notation ::::::::::::::::::::::::::::::::::::::: 3
1.3.4 Printing Notation ::::::::::::::::::::::::::::::::::::::::: 3
1.3.5 Error Messages :::::::::::::::::::::::::::::::::::::::::::: 3
1.3.6 Bufer Text Notation :::::::::::::::::::::::::::::::::::::: 4
1.3.7 Format of Descriptions :::::::::::::::::::::::::::::::::::: 4
1.3.7.1 A Sample Function Description ::::::::::::::::::::::: 4
1.3.7.2 A Sample Variable Description:::::::::::::::::::::::: 6
1.4 Version Information :::::::::::::::::::::::::::::::::::::::::::: 6
1.5 Acknowledgements ::::::::::::::::::::::::::::::::::::::::::::: 7
2 Lisp Data Types :::::::::::::::::::::::::::::::: 8
2.1 Printed Representation and Read Syntax ::::::::::::::::::::::: 8
2.2 Comments ::::::::::::::::::::::::::::::::::::::::::::::::::::: 9
2.3 Programming Types:::::::::::::::::::::::::::::::::::::::::::: 9
2.3.1 Integer Type :::::::::::::::::::::::::::::::::::::::::::::: 9
2.3.2 Floating Point Type:::::::::::::::::::::::::::::::::::::: 10
2.3.3 Character Type :::::::::::::::::::::::::::::::::::::::::: 10
2.3.3.1 Basic Char Syntax :::::::::::::::::::::::::::::::::: 10
2.3.3.2 General Escape Syntax :::::::::::::::::::::::::::::: 11
2.3.3.3 Control-Character Syntax ::::::::::::::::::::::::::: 12
2.3.3.4 Meta-Character Syntax:::::::::::::::::::::::::::::: 12
2.3.3.5 Other Character Modiier Bits ::::::::::::::::::::::: 13
2.3.4 Symbol Type::::::::::::::::::::::::::::::::::::::::::::: 13
2.3.5 Sequence Types :::::::::::::::::::::::::::::::::::::::::: 14
2.3.6 Cons Cell and List Types::::::::::::::::::::::::::::::::: 14
2.3.6.1 Drawing Lists as Box Diagrams:::::::::::::::::::::: 15
2.3.6.2 Dotted Pair Notation:::::::::::::::::::::::::::::::: 16
2.3.6.3 Association List Type ::::::::::::::::::::::::::::::: 17
2.3.7 Array Type :::::::::::::::::::::::::::::::::::::::::::::: 18
2.3.8 String Type :::::::::::::::::::::::::::::::::::::::::::::: 18
2.3.8.1 Syntax for Strings ::::::::::::::::::::::::::::::::::: 18
2.3.8.2 Non- ASCII Characters in Strings::::::::::::::::::::: 19
2.3.8.3 Nonprinting Characters in Strings ::::::::::::::::::: 19
2.3.8.4 Text Properties in Strings ::::::::::::::::::::::::::: 20
2.3.9 Vector Type:::::::::::::::::::::::::::::::::::::::::::::: 20
2.3.10 Char-Table Type:::::::::::::::::::::::::::::::::::::::: 20
2.3.11 Bool-Vector Type ::::::::::::::::::::::::::::::::::::::: 21
Zgłoś jeśli naruszono regulamin