elisp.texi 73 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626
  1. \input texinfo @c -*-texinfo-*-
  2. @c %**start of header
  3. @setfilename ../../info/elisp.info
  4. @ifset VOL1
  5. @set volflag
  6. @set voltitle Volume 1
  7. @end ifset
  8. @ifset VOL2
  9. @set volflag
  10. @set voltitle Volume 2
  11. @end ifset
  12. @ifset volflag
  13. @settitle GNU Emacs Lisp Reference Manual: @value{voltitle}
  14. @end ifset
  15. @ifclear volflag
  16. @settitle GNU Emacs Lisp Reference Manual
  17. @end ifclear
  18. @c %**end of header
  19. @c See two-volume-cross-refs.txt.
  20. @tex
  21. @ifset VOL1
  22. \message{Formatting for two volume edition...Volume 1...}
  23. %
  24. % Read special toc file, set up in two-volume.make.
  25. \gdef\tocreadfilename{elisp1-toc-ready.toc}
  26. %
  27. % Don't make outlines, they're not needed and \readdatafile can't pay
  28. % attention to the special definition above.
  29. \global\let\pdfmakeoutlines=\relax
  30. %
  31. % Start volume 1 chapter numbering at 1; this must be listed as chapno0.
  32. \global\chapno=0
  33. @end ifset
  34. @ifset VOL2
  35. \message{Formatting for two volume edition...Volume 2...}
  36. %
  37. % Read special toc file, set up in two-volume.make.
  38. \gdef\tocreadfilename{elisp2-toc-ready.toc}
  39. %
  40. % Don't make outlines, they're not needed and \readdatafile can't pay
  41. % attention to the special definition above.
  42. \global\let\pdfmakeoutlines=\relax
  43. %
  44. % Start volume 2 chapter numbering at 27; this must be listed as chapno26
  45. \global\chapno=26
  46. @end ifset
  47. @end tex
  48. @c Version of the manual and of Emacs.
  49. @c (See comments for EDITION in emacs.texi)
  50. @set VERSION 3.1
  51. @include emacsver.texi
  52. @set DATE October 2014
  53. @c in general, keep the following line commented out, unless doing a
  54. @c copy of this manual that will be published. The manual should go
  55. @c onto the distribution in the full, 8.5 x 11" size.
  56. @c @set smallbook
  57. @ifset volflag
  58. @smallbook
  59. @end ifset
  60. @ifset smallbook
  61. @smallbook
  62. @end ifset
  63. @c per rms and peterb, use 10pt fonts for the main text, mostly to
  64. @c save on paper cost.
  65. @c Do this inside @tex for now, so current makeinfo does not complain.
  66. @tex
  67. @ifset smallbook
  68. @fonttextsize 10
  69. @end ifset
  70. \global\hbadness=6666 % don't worry about not-too-underfull boxes
  71. @end tex
  72. @c Combine indices.
  73. @synindex cp fn
  74. @syncodeindex vr fn
  75. @syncodeindex ky fn
  76. @syncodeindex pg fn
  77. @c We use the "type index" to index new functions and variables.
  78. @c @syncodeindex tp fn
  79. @copying
  80. @iftex
  81. This is edition @value{VERSION} of the @cite{GNU Emacs Lisp Reference Manual},@*
  82. @end iftex
  83. @ifnottex
  84. This is the @cite{GNU Emacs Lisp Reference Manual}
  85. @end ifnottex
  86. corresponding to Emacs version @value{EMACSVER}.
  87. Copyright @copyright{} 1990--1996, 1998--2015 Free Software Foundation, Inc.
  88. @quotation
  89. Permission is granted to copy, distribute and/or modify this document
  90. under the terms of the GNU Free Documentation License, Version 1.3 or
  91. any later version published by the Free Software Foundation; with the
  92. Invariant Sections being ``GNU General Public License,'' with the
  93. Front-Cover Texts being ``A GNU Manual,'' and with the Back-Cover
  94. Texts as in (a) below. A copy of the license is included in the
  95. section entitled ``GNU Free Documentation License.''
  96. (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
  97. modify this GNU manual. Buying copies from the FSF supports it in
  98. developing GNU and promoting software freedom.''
  99. @end quotation
  100. @end copying
  101. @documentencoding UTF-8
  102. @dircategory Emacs lisp
  103. @direntry
  104. * Elisp: (elisp). The Emacs Lisp Reference Manual.
  105. @end direntry
  106. @titlepage
  107. @title GNU Emacs Lisp Reference Manual
  108. @ifset volflag
  109. @subtitle @value{voltitle}
  110. @end ifset
  111. @subtitle For Emacs Version @value{EMACSVER}
  112. @subtitle Revision @value{VERSION}, @value{DATE}
  113. @author by Bil Lewis, Dan LaLiberte, Richard Stallman,
  114. @author the GNU Manual Group, et al.
  115. @page
  116. @vskip 0pt plus 1filll
  117. @insertcopying
  118. @sp 2
  119. Published by the Free Software Foundation @*
  120. 51 Franklin St, Fifth Floor @*
  121. Boston, MA 02110-1301 @*
  122. USA @*
  123. ISBN 1-882114-74-4
  124. @sp 2
  125. Cover art by Etienne Suvasa.
  126. @end titlepage
  127. @c Print the tables of contents
  128. @summarycontents
  129. @contents
  130. @ifnottex
  131. @node Top
  132. @top Emacs Lisp
  133. @ifset WWW_GNU_ORG
  134. @html
  135. <p>The homepage for GNU Emacs is at
  136. <a href="/software/emacs/">http://www.gnu.org/software/emacs/</a>.<br>
  137. For information on using Emacs, refer to the
  138. <a href="/software/emacs/manual/emacs.html">Emacs Manual</a>.<br>
  139. To view this manual in other formats, click
  140. <a href="/software/emacs/manual/elisp.html">here</a>.
  141. @end html
  142. @end ifset
  143. @insertcopying
  144. @end ifnottex
  145. @menu
  146. * Introduction:: Introduction and conventions used.
  147. * Lisp Data Types:: Data types of objects in Emacs Lisp.
  148. * Numbers:: Numbers and arithmetic functions.
  149. * Strings and Characters:: Strings, and functions that work on them.
  150. * Lists:: Lists, cons cells, and related functions.
  151. * Sequences Arrays Vectors:: Lists, strings and vectors are called sequences.
  152. Certain functions act on any kind of sequence.
  153. The description of vectors is here as well.
  154. * Hash Tables:: Very fast lookup-tables.
  155. * Symbols:: Symbols represent names, uniquely.
  156. * Evaluation:: How Lisp expressions are evaluated.
  157. * Control Structures:: Conditionals, loops, nonlocal exits.
  158. * Variables:: Using symbols in programs to stand for values.
  159. * Functions:: A function is a Lisp program
  160. that can be invoked from other functions.
  161. * Macros:: Macros are a way to extend the Lisp language.
  162. * Customization:: Making variables and faces customizable.
  163. * Loading:: Reading files of Lisp code into Lisp.
  164. * Byte Compilation:: Compilation makes programs run faster.
  165. * Debugging:: Tools and tips for debugging Lisp programs.
  166. * Read and Print:: Converting Lisp objects to text and back.
  167. * Minibuffers:: Using the minibuffer to read input.
  168. * Command Loop:: How the editor command loop works,
  169. and how you can call its subroutines.
  170. * Keymaps:: Defining the bindings from keys to commands.
  171. * Modes:: Defining major and minor modes.
  172. * Documentation:: Writing and using documentation strings.
  173. * Files:: Accessing files.
  174. * Backups and Auto-Saving:: Controlling how backups and auto-save
  175. files are made.
  176. * Buffers:: Creating and using buffer objects.
  177. * Windows:: Manipulating windows and displaying buffers.
  178. * Frames:: Making multiple system-level windows.
  179. * Positions:: Buffer positions and motion functions.
  180. * Markers:: Markers represent positions and update
  181. automatically when the text is changed.
  182. * Text:: Examining and changing text in buffers.
  183. * Non-ASCII Characters:: Non-ASCII text in buffers and strings.
  184. * Searching and Matching:: Searching buffers for strings or regexps.
  185. * Syntax Tables:: The syntax table controls word and list parsing.
  186. * Abbrevs:: How Abbrev mode works, and its data structures.
  187. * Processes:: Running and communicating with subprocesses.
  188. * Display:: Features for controlling the screen display.
  189. * System Interface:: Getting the user id, system type, environment
  190. variables, and other such things.
  191. * Packaging:: Preparing Lisp code for distribution.
  192. Appendices
  193. * Antinews:: Info for users downgrading to Emacs 23.
  194. * GNU Free Documentation License:: The license for this documentation.
  195. * GPL:: Conditions for copying and changing GNU Emacs.
  196. * Tips:: Advice and coding conventions for Emacs Lisp.
  197. * GNU Emacs Internals:: Building and dumping Emacs;
  198. internal data structures.
  199. * Standard Errors:: List of some standard error symbols.
  200. * Standard Keymaps:: List of some standard keymaps.
  201. * Standard Hooks:: List of some standard hook variables.
  202. * Index:: Index including concepts, functions, variables,
  203. and other terms.
  204. @ignore
  205. * New Symbols:: New functions and variables in Emacs @value{EMACSVER}.
  206. @end ignore
  207. @c Do NOT modify the following 3 lines! They must have this form to
  208. @c be correctly identified by 'texinfo-multiple-files-update'. In
  209. @c particular, the detailed menu header line MUST be identical to the
  210. @c value of 'texinfo-master-menu-header'. See texnfo-upd.el.
  211. @detailmenu
  212. --- The Detailed Node Listing ---
  213. ---------------------------------
  214. Here are other nodes that are subnodes of those already listed,
  215. mentioned here so you can get to them in one step:
  216. Introduction
  217. * Caveats:: Flaws and a request for help.
  218. * Lisp History:: Emacs Lisp is descended from Maclisp.
  219. * Conventions:: How the manual is formatted.
  220. * Version Info:: Which Emacs version is running?
  221. * Acknowledgments:: The authors, editors, and sponsors of this manual.
  222. Conventions
  223. * Some Terms:: Explanation of terms we use in this manual.
  224. * nil and t:: How the symbols @code{nil} and @code{t} are used.
  225. * Evaluation Notation:: The format we use for examples of evaluation.
  226. * Printing Notation:: The format we use when examples print text.
  227. * Error Messages:: The format we use for examples of errors.
  228. * Buffer Text Notation:: The format we use for buffer contents in examples.
  229. * Format of Descriptions:: Notation for describing functions, variables, etc.
  230. Format of Descriptions
  231. * A Sample Function Description:: A description of an imaginary
  232. function, @code{foo}.
  233. * A Sample Variable Description:: A description of an imaginary
  234. variable, @code{electric-future-map}.
  235. Lisp Data Types
  236. * Printed Representation:: How Lisp objects are represented as text.
  237. * Comments:: Comments and their formatting conventions.
  238. * Programming Types:: Types found in all Lisp systems.
  239. * Editing Types:: Types specific to Emacs.
  240. * Circular Objects:: Read syntax for circular structure.
  241. * Type Predicates:: Tests related to types.
  242. * Equality Predicates:: Tests of equality between any two objects.
  243. Programming Types
  244. * Integer Type:: Numbers without fractional parts.
  245. * Floating-Point Type:: Numbers with fractional parts and with a large range.
  246. * Character Type:: The representation of letters, numbers and
  247. control characters.
  248. * Symbol Type:: A multi-use object that refers to a function,
  249. variable, or property list, and has a unique identity.
  250. * Sequence Type:: Both lists and arrays are classified as sequences.
  251. * Cons Cell Type:: Cons cells, and lists (which are made from cons cells).
  252. * Array Type:: Arrays include strings and vectors.
  253. * String Type:: An (efficient) array of characters.
  254. * Vector Type:: One-dimensional arrays.
  255. * Char-Table Type:: One-dimensional sparse arrays indexed by characters.
  256. * Bool-Vector Type:: One-dimensional arrays of @code{t} or @code{nil}.
  257. * Hash Table Type:: Super-fast lookup tables.
  258. * Function Type:: A piece of executable code you can call from elsewhere.
  259. * Macro Type:: A method of expanding an expression into another
  260. expression, more fundamental but less pretty.
  261. * Primitive Function Type:: A function written in C, callable from Lisp.
  262. * Byte-Code Type:: A function written in Lisp, then compiled.
  263. * Autoload Type:: A type used for automatically loading seldom-used
  264. functions.
  265. * Finalizer Type:: Runs code when no longer reachable.
  266. Character Type
  267. * Basic Char Syntax:: Syntax for regular characters.
  268. * General Escape Syntax:: How to specify characters by their codes.
  269. * Ctl-Char Syntax:: Syntax for control characters.
  270. * Meta-Char Syntax:: Syntax for meta-characters.
  271. * Other Char Bits:: Syntax for hyper-, super-, and alt-characters.
  272. Cons Cell and List Types
  273. * Box Diagrams:: Drawing pictures of lists.
  274. * Dotted Pair Notation:: A general syntax for cons cells.
  275. * Association List Type:: A specially constructed list.
  276. String Type
  277. * Syntax for Strings:: How to specify Lisp strings.
  278. * Non-ASCII in Strings:: International characters in strings.
  279. * Nonprinting Characters:: Literal unprintable characters in strings.
  280. * Text Props and Strings:: Strings with text properties.
  281. Editing Types
  282. * Buffer Type:: The basic object of editing.
  283. * Marker Type:: A position in a buffer.
  284. * Window Type:: Buffers are displayed in windows.
  285. * Frame Type:: Windows subdivide frames.
  286. * Terminal Type:: A terminal device displays frames.
  287. * Window Configuration Type:: Recording the way a frame is subdivided.
  288. * Frame Configuration Type:: Recording the status of all frames.
  289. * Process Type:: A subprocess of Emacs running on the underlying OS.
  290. * Stream Type:: Receive or send characters.
  291. * Keymap Type:: What function a keystroke invokes.
  292. * Overlay Type:: How an overlay is represented.
  293. * Font Type:: Fonts for displaying text.
  294. Numbers
  295. * Integer Basics:: Representation and range of integers.
  296. * Float Basics:: Representation and range of floating point.
  297. * Predicates on Numbers:: Testing for numbers.
  298. * Comparison of Numbers:: Equality and inequality predicates.
  299. * Numeric Conversions:: Converting float to integer and vice versa.
  300. * Arithmetic Operations:: How to add, subtract, multiply and divide.
  301. * Rounding Operations:: Explicitly rounding floating-point numbers.
  302. * Bitwise Operations:: Logical and, or, not, shifting.
  303. * Math Functions:: Trig, exponential and logarithmic functions.
  304. * Random Numbers:: Obtaining random integers, predictable or not.
  305. Strings and Characters
  306. * String Basics:: Basic properties of strings and characters.
  307. * Predicates for Strings:: Testing whether an object is a string or char.
  308. * Creating Strings:: Functions to allocate new strings.
  309. * Modifying Strings:: Altering the contents of an existing string.
  310. * Text Comparison:: Comparing characters or strings.
  311. * String Conversion:: Converting to and from characters and strings.
  312. * Formatting Strings:: @code{format}: Emacs's analogue of @code{printf}.
  313. * Case Conversion:: Case conversion functions.
  314. * Case Tables:: Customizing case conversion.
  315. Lists
  316. * Cons Cells:: How lists are made out of cons cells.
  317. * List-related Predicates:: Is this object a list? Comparing two lists.
  318. * List Elements:: Extracting the pieces of a list.
  319. * Building Lists:: Creating list structure.
  320. * List Variables:: Modifying lists stored in variables.
  321. * Modifying Lists:: Storing new pieces into an existing list.
  322. * Sets And Lists:: A list can represent a finite mathematical set.
  323. * Association Lists:: A list can represent a finite relation or mapping.
  324. * Property Lists:: A list of paired elements.
  325. Modifying Existing List Structure
  326. * Setcar:: Replacing an element in a list.
  327. * Setcdr:: Replacing part of the list backbone.
  328. This can be used to remove or add elements.
  329. * Rearrangement:: Reordering the elements in a list; combining lists.
  330. Property Lists
  331. * Plists and Alists:: Comparison of the advantages of property
  332. lists and association lists.
  333. * Plist Access:: Accessing property lists stored elsewhere.
  334. Sequences, Arrays, and Vectors
  335. * Sequence Functions:: Functions that accept any kind of sequence.
  336. * Arrays:: Characteristics of arrays in Emacs Lisp.
  337. * Array Functions:: Functions specifically for arrays.
  338. * Vectors:: Special characteristics of Emacs Lisp vectors.
  339. * Vector Functions:: Functions specifically for vectors.
  340. * Char-Tables:: How to work with char-tables.
  341. * Bool-Vectors:: How to work with bool-vectors.
  342. * Rings:: Managing a fixed-size ring of objects.
  343. Hash Tables
  344. * Creating Hash:: Functions to create hash tables.
  345. * Hash Access:: Reading and writing the hash table contents.
  346. * Defining Hash:: Defining new comparison methods.
  347. * Other Hash:: Miscellaneous.
  348. Symbols
  349. * Symbol Components:: Symbols have names, values, function definitions
  350. and property lists.
  351. * Definitions:: A definition says how a symbol will be used.
  352. * Creating Symbols:: How symbols are kept unique.
  353. * Symbol Properties:: Each symbol has a property list
  354. for recording miscellaneous information.
  355. Symbol Properties
  356. * Symbol Plists:: Accessing symbol properties.
  357. * Standard Properties:: Standard meanings of symbol properties.
  358. Evaluation
  359. * Intro Eval:: Evaluation in the scheme of things.
  360. * Forms:: How various sorts of objects are evaluated.
  361. * Quoting:: Avoiding evaluation (to put constants in
  362. the program).
  363. * Backquote:: Easier construction of list structure.
  364. * Eval:: How to invoke the Lisp interpreter explicitly.
  365. Kinds of Forms
  366. * Self-Evaluating Forms:: Forms that evaluate to themselves.
  367. * Symbol Forms:: Symbols evaluate as variables.
  368. * Classifying Lists:: How to distinguish various sorts of list forms.
  369. * Function Indirection:: When a symbol appears as the car of a list,
  370. we find the real function via the symbol.
  371. * Function Forms:: Forms that call functions.
  372. * Macro Forms:: Forms that call macros.
  373. * Special Forms:: "Special forms" are idiosyncratic primitives,
  374. most of them extremely important.
  375. * Autoloading:: Functions set up to load files
  376. containing their real definitions.
  377. Control Structures
  378. * Sequencing:: Evaluation in textual order.
  379. * Conditionals:: @code{if}, @code{cond}, @code{when}, @code{unless}.
  380. * Combining Conditions:: @code{and}, @code{or}, @code{not}.
  381. * Iteration:: @code{while} loops.
  382. * Generators:: Generic sequences and coroutines.
  383. * Nonlocal Exits:: Jumping out of a sequence.
  384. Nonlocal Exits
  385. * Catch and Throw:: Nonlocal exits for the program's own purposes.
  386. * Examples of Catch:: Showing how such nonlocal exits can be written.
  387. * Errors:: How errors are signaled and handled.
  388. * Cleanups:: Arranging to run a cleanup form if an
  389. error happens.
  390. Errors
  391. * Signaling Errors:: How to report an error.
  392. * Processing of Errors:: What Emacs does when you report an error.
  393. * Handling Errors:: How you can trap errors and continue execution.
  394. * Error Symbols:: How errors are classified for trapping them.
  395. Variables
  396. * Global Variables:: Variable values that exist permanently, everywhere.
  397. * Constant Variables:: Certain "variables" have values that never change.
  398. * Local Variables:: Variable values that exist only temporarily.
  399. * Void Variables:: Symbols that lack values.
  400. * Defining Variables:: A definition says a symbol is used as a variable.
  401. * Tips for Defining:: Things you should think about when you
  402. define a variable.
  403. * Accessing Variables:: Examining values of variables whose names
  404. are known only at run time.
  405. * Setting Variables:: Storing new values in variables.
  406. * Variable Scoping:: How Lisp chooses among local and global values.
  407. * Buffer-Local Variables:: Variable values in effect only in one buffer.
  408. * File Local Variables:: Handling local variable lists in files.
  409. * Directory Local Variables:: Local variables common to all files in a
  410. directory.
  411. * Variable Aliases:: Variables that are aliases for other variables.
  412. * Variables with Restricted Values:: Non-constant variables whose value can
  413. @emph{not} be an arbitrary Lisp object.
  414. * Generalized Variables:: Extending the concept of variables.
  415. Scoping Rules for Variable Bindings
  416. * Dynamic Binding:: The default for binding local variables in Emacs.
  417. * Dynamic Binding Tips:: Avoiding problems with dynamic binding.
  418. * Lexical Binding:: A different type of local variable binding.
  419. * Using Lexical Binding:: How to enable lexical binding.
  420. Buffer-Local Variables
  421. * Intro to Buffer-Local:: Introduction and concepts.
  422. * Creating Buffer-Local:: Creating and destroying buffer-local bindings.
  423. * Default Value:: The default value is seen in buffers
  424. that don't have their own buffer-local values.
  425. Generalized Variables
  426. * Setting Generalized Variables:: The @code{setf} macro.
  427. * Adding Generalized Variables:: Defining new @code{setf} forms.
  428. Functions
  429. * What Is a Function:: Lisp functions vs. primitives; terminology.
  430. * Lambda Expressions:: How functions are expressed as Lisp objects.
  431. * Function Names:: A symbol can serve as the name of a function.
  432. * Defining Functions:: Lisp expressions for defining functions.
  433. * Calling Functions:: How to use an existing function.
  434. * Mapping Functions:: Applying a function to each element of a list, etc.
  435. * Anonymous Functions:: Lambda expressions are functions with no names.
  436. * Function Cells:: Accessing or setting the function definition
  437. of a symbol.
  438. * Closures:: Functions that enclose a lexical environment.
  439. * Obsolete Functions:: Declaring functions obsolete.
  440. * Inline Functions:: Defining functions that the compiler
  441. will expand inline.
  442. * Declare Form:: Adding additional information about a function.
  443. * Declaring Functions:: Telling the compiler that a function is defined.
  444. * Function Safety:: Determining whether a function is safe to call.
  445. * Related Topics:: Cross-references to specific Lisp primitives
  446. that have a special bearing on how
  447. functions work.
  448. Lambda Expressions
  449. * Lambda Components:: The parts of a lambda expression.
  450. * Simple Lambda:: A simple example.
  451. * Argument List:: Details and special features of argument lists.
  452. * Function Documentation:: How to put documentation in a function.
  453. Macros
  454. * Simple Macro:: A basic example.
  455. * Expansion:: How, when and why macros are expanded.
  456. * Compiling Macros:: How macros are expanded by the compiler.
  457. * Defining Macros:: How to write a macro definition.
  458. * Problems with Macros:: Don't evaluate the macro arguments too many times.
  459. Don't hide the user's variables.
  460. * Indenting Macros:: Specifying how to indent macro calls.
  461. Common Problems Using Macros
  462. * Wrong Time:: Do the work in the expansion, not in the macro.
  463. * Argument Evaluation:: The expansion should evaluate each macro arg once.
  464. * Surprising Local Vars:: Local variable bindings in the expansion
  465. require special care.
  466. * Eval During Expansion:: Don't evaluate them; put them in the expansion.
  467. * Repeated Expansion:: Avoid depending on how many times expansion is done.
  468. Customization Settings
  469. * Common Keywords:: Common keyword arguments for all kinds of
  470. customization declarations.
  471. * Group Definitions:: Writing customization group definitions.
  472. * Variable Definitions:: Declaring user options.
  473. * Customization Types:: Specifying the type of a user option.
  474. * Applying Customizations:: Functions to apply customization settings.
  475. * Custom Themes:: Writing Custom themes.
  476. Customization Types
  477. * Simple Types:: Simple customization types: sexp, integer, etc.
  478. * Composite Types:: Build new types from other types or data.
  479. * Splicing into Lists:: Splice elements into list with @code{:inline}.
  480. * Type Keywords:: Keyword-argument pairs in a customization type.
  481. * Defining New Types:: Give your type a name.
  482. Loading
  483. * How Programs Do Loading:: The @code{load} function and others.
  484. * Load Suffixes:: Details about the suffixes that @code{load} tries.
  485. * Library Search:: Finding a library to load.
  486. * Loading Non-ASCII:: Non-@acronym{ASCII} characters in Emacs Lisp files.
  487. * Autoload:: Setting up a function to autoload.
  488. * Repeated Loading:: Precautions about loading a file twice.
  489. * Named Features:: Loading a library if it isn't already loaded.
  490. * Where Defined:: Finding which file defined a certain symbol.
  491. * Unloading:: How to "unload" a library that was loaded.
  492. * Hooks for Loading:: Providing code to be run when
  493. particular libraries are loaded.
  494. Byte Compilation
  495. * Speed of Byte-Code:: An example of speedup from byte compilation.
  496. * Compilation Functions:: Byte compilation functions.
  497. * Docs and Compilation:: Dynamic loading of documentation strings.
  498. * Dynamic Loading:: Dynamic loading of individual functions.
  499. * Eval During Compile:: Code to be evaluated when you compile.
  500. * Compiler Errors:: Handling compiler error messages.
  501. * Byte-Code Objects:: The data type used for byte-compiled functions.
  502. * Disassembly:: Disassembling byte-code; how to read byte-code.
  503. Debugging Lisp Programs
  504. * Debugger:: A debugger for the Emacs Lisp evaluator.
  505. * Edebug:: A source-level Emacs Lisp debugger.
  506. * Syntax Errors:: How to find syntax errors.
  507. * Test Coverage:: Ensuring you have tested all branches in your code.
  508. * Profiling:: Measuring the resources that your code uses.
  509. The Lisp Debugger
  510. * Error Debugging:: Entering the debugger when an error happens.
  511. * Infinite Loops:: Stopping and debugging a program that doesn't exit.
  512. * Function Debugging:: Entering it when a certain function is called.
  513. * Explicit Debug:: Entering it at a certain point in the program.
  514. * Using Debugger:: What the debugger does; what you see while in it.
  515. * Debugger Commands:: Commands used while in the debugger.
  516. * Invoking the Debugger:: How to call the function @code{debug}.
  517. * Internals of Debugger:: Subroutines of the debugger, and global variables.
  518. Edebug
  519. * Using Edebug:: Introduction to use of Edebug.
  520. * Instrumenting:: You must instrument your code
  521. in order to debug it with Edebug.
  522. * Edebug Execution Modes:: Execution modes, stopping more or less often.
  523. * Jumping:: Commands to jump to a specified place.
  524. * Edebug Misc:: Miscellaneous commands.
  525. * Breaks:: Setting breakpoints to make the program stop.
  526. * Trapping Errors:: Trapping errors with Edebug.
  527. * Edebug Views:: Views inside and outside of Edebug.
  528. * Edebug Eval:: Evaluating expressions within Edebug.
  529. * Eval List:: Expressions whose values are displayed
  530. each time you enter Edebug.
  531. * Printing in Edebug:: Customization of printing.
  532. * Trace Buffer:: How to produce trace output in a buffer.
  533. * Coverage Testing:: How to test evaluation coverage.
  534. * The Outside Context:: Data that Edebug saves and restores.
  535. * Edebug and Macros:: Specifying how to handle macro calls.
  536. * Edebug Options:: Option variables for customizing Edebug.
  537. Breaks
  538. * Breakpoints:: Breakpoints at stop points.
  539. * Global Break Condition:: Breaking on an event.
  540. * Source Breakpoints:: Embedding breakpoints in source code.
  541. The Outside Context
  542. * Checking Whether to Stop::When Edebug decides what to do.
  543. * Edebug Display Update:: When Edebug updates the display.
  544. * Edebug Recursive Edit:: When Edebug stops execution.
  545. Edebug and Macros
  546. * Instrumenting Macro Calls::The basic problem.
  547. * Specification List:: How to specify complex patterns of evaluation.
  548. * Backtracking:: What Edebug does when matching fails.
  549. * Specification Examples:: To help understand specifications.
  550. Debugging Invalid Lisp Syntax
  551. * Excess Open:: How to find a spurious open paren or missing close.
  552. * Excess Close:: How to find a spurious close paren or missing open.
  553. Reading and Printing Lisp Objects
  554. * Streams Intro:: Overview of streams, reading and printing.
  555. * Input Streams:: Various data types that can be used as
  556. input streams.
  557. * Input Functions:: Functions to read Lisp objects from text.
  558. * Output Streams:: Various data types that can be used as
  559. output streams.
  560. * Output Functions:: Functions to print Lisp objects as text.
  561. * Output Variables:: Variables that control what the printing
  562. functions do.
  563. Minibuffers
  564. * Intro to Minibuffers:: Basic information about minibuffers.
  565. * Text from Minibuffer:: How to read a straight text string.
  566. * Object from Minibuffer:: How to read a Lisp object or expression.
  567. * Minibuffer History:: Recording previous minibuffer inputs
  568. so the user can reuse them.
  569. * Initial Input:: Specifying initial contents for the minibuffer.
  570. * Completion:: How to invoke and customize completion.
  571. * Yes-or-No Queries:: Asking a question with a simple answer.
  572. * Multiple Queries:: Asking a series of similar questions.
  573. * Reading a Password:: Reading a password from the terminal.
  574. * Minibuffer Commands:: Commands used as key bindings in minibuffers.
  575. * Minibuffer Windows:: Operating on the special minibuffer windows.
  576. * Minibuffer Contents:: How such commands access the minibuffer text.
  577. * Recursive Mini:: Whether recursive entry to minibuffer is allowed.
  578. * Minibuffer Misc:: Various customization hooks and variables.
  579. Completion
  580. * Basic Completion:: Low-level functions for completing strings.
  581. * Minibuffer Completion:: Invoking the minibuffer with completion.
  582. * Completion Commands:: Minibuffer commands that do completion.
  583. * High-Level Completion:: Convenient special cases of completion
  584. (reading buffer names, variable names, etc.).
  585. * Reading File Names:: Using completion to read file names and
  586. shell commands.
  587. * Completion Variables:: Variables controlling completion behavior.
  588. * Programmed Completion:: Writing your own completion function.
  589. * Completion in Buffers:: Completing text in ordinary buffers.
  590. Command Loop
  591. * Command Overview:: How the command loop reads commands.
  592. * Defining Commands:: Specifying how a function should read arguments.
  593. * Interactive Call:: Calling a command, so that it will read arguments.
  594. * Distinguish Interactive:: Making a command distinguish interactive calls.
  595. * Command Loop Info:: Variables set by the command loop for you to examine.
  596. * Adjusting Point:: Adjustment of point after a command.
  597. * Input Events:: What input looks like when you read it.
  598. * Reading Input:: How to read input events from the keyboard or mouse.
  599. * Special Events:: Events processed immediately and individually.
  600. * Waiting:: Waiting for user input or elapsed time.
  601. * Quitting:: How @kbd{C-g} works. How to catch or defer quitting.
  602. * Prefix Command Arguments:: How the commands to set prefix args work.
  603. * Recursive Editing:: Entering a recursive edit,
  604. and why you usually shouldn't.
  605. * Disabling Commands:: How the command loop handles disabled commands.
  606. * Command History:: How the command history is set up, and how accessed.
  607. * Keyboard Macros:: How keyboard macros are implemented.
  608. Defining Commands
  609. * Using Interactive:: General rules for @code{interactive}.
  610. * Interactive Codes:: The standard letter-codes for reading arguments
  611. in various ways.
  612. * Interactive Examples:: Examples of how to read interactive arguments.
  613. * Generic Commands:: Select among command alternatives.
  614. Input Events
  615. * Keyboard Events:: Ordinary characters -- keys with symbols on them.
  616. * Function Keys:: Function keys -- keys with names, not symbols.
  617. * Mouse Events:: Overview of mouse events.
  618. * Click Events:: Pushing and releasing a mouse button.
  619. * Drag Events:: Moving the mouse before releasing the button.
  620. * Button-Down Events:: A button was pushed and not yet released.
  621. * Repeat Events:: Double and triple click (or drag, or down).
  622. * Motion Events:: Just moving the mouse, not pushing a button.
  623. * Focus Events:: Moving the mouse between frames.
  624. * Misc Events:: Other events the system can generate.
  625. * Event Examples:: Examples of the lists for mouse events.
  626. * Classifying Events:: Finding the modifier keys in an event symbol.
  627. Event types.
  628. * Accessing Mouse:: Functions to extract info from mouse events.
  629. * Accessing Scroll:: Functions to get info from scroll bar events.
  630. * Strings of Events:: Special considerations for putting
  631. keyboard character events in a string.
  632. Reading Input
  633. * Key Sequence Input:: How to read one key sequence.
  634. * Reading One Event:: How to read just one event.
  635. * Event Mod:: How Emacs modifies events as they are read.
  636. * Invoking the Input Method:: How reading an event uses the input method.
  637. * Quoted Character Input:: Asking the user to specify a character.
  638. * Event Input Misc:: How to reread or throw away input events.
  639. Keymaps
  640. * Key Sequences:: Key sequences as Lisp objects.
  641. * Keymap Basics:: Basic concepts of keymaps.
  642. * Format of Keymaps:: What a keymap looks like as a Lisp object.
  643. * Creating Keymaps:: Functions to create and copy keymaps.
  644. * Inheritance and Keymaps:: How one keymap can inherit the bindings
  645. of another keymap.
  646. * Prefix Keys:: Defining a key with a keymap as its definition.
  647. * Active Keymaps:: How Emacs searches the active keymaps
  648. for a key binding.
  649. * Searching Keymaps:: A pseudo-Lisp summary of searching active maps.
  650. * Controlling Active Maps:: Each buffer has a local keymap
  651. to override the standard (global) bindings.
  652. A minor mode can also override them.
  653. * Key Lookup:: Finding a key's binding in one keymap.
  654. * Functions for Key Lookup:: How to request key lookup.
  655. * Changing Key Bindings:: Redefining a key in a keymap.
  656. * Remapping Commands:: A keymap can translate one command to another.
  657. * Translation Keymaps:: Keymaps for translating sequences of events.
  658. * Key Binding Commands:: Interactive interfaces for redefining keys.
  659. * Scanning Keymaps:: Looking through all keymaps, for printing help.
  660. * Menu Keymaps:: Defining a menu as a keymap.
  661. Menu Keymaps
  662. * Defining Menus:: How to make a keymap that defines a menu.
  663. * Mouse Menus:: How users actuate the menu with the mouse.
  664. * Keyboard Menus:: How users actuate the menu with the keyboard.
  665. * Menu Example:: Making a simple menu.
  666. * Menu Bar:: How to customize the menu bar.
  667. * Tool Bar:: A tool bar is a row of images.
  668. * Modifying Menus:: How to add new items to a menu.
  669. * Easy Menu:: A convenience macro for defining menus.
  670. Defining Menus
  671. * Simple Menu Items:: A simple kind of menu key binding.
  672. * Extended Menu Items:: More complex menu item definitions.
  673. * Menu Separators:: Drawing a horizontal line through a menu.
  674. * Alias Menu Items:: Using command aliases in menu items.
  675. Major and Minor Modes
  676. * Hooks:: How to use hooks; how to write code that provides hooks.
  677. * Major Modes:: Defining major modes.
  678. * Minor Modes:: Defining minor modes.
  679. * Mode Line Format:: Customizing the text that appears in the mode line.
  680. * Imenu:: Providing a menu of definitions made in a buffer.
  681. * Font Lock Mode:: How modes can highlight text according to syntax.
  682. * Auto-Indentation:: How to teach Emacs to indent for a major mode.
  683. * Desktop Save Mode:: How modes can have buffer state saved between
  684. Emacs sessions.
  685. Hooks
  686. * Running Hooks:: How to run a hook.
  687. * Setting Hooks:: How to put functions on a hook, or remove them.
  688. Major Modes
  689. * Major Mode Conventions:: Coding conventions for keymaps, etc.
  690. * Auto Major Mode:: How Emacs chooses the major mode automatically.
  691. * Mode Help:: Finding out how to use a mode.
  692. * Derived Modes:: Defining a new major mode based on another major
  693. mode.
  694. * Basic Major Modes:: Modes that other modes are often derived from.
  695. * Mode Hooks:: Hooks run at the end of major mode functions.
  696. * Tabulated List Mode:: Parent mode for buffers containing tabulated data.
  697. * Generic Modes:: Defining a simple major mode that supports
  698. comment syntax and Font Lock mode.
  699. * Example Major Modes:: Text mode and Lisp modes.
  700. Minor Modes
  701. * Minor Mode Conventions:: Tips for writing a minor mode.
  702. * Keymaps and Minor Modes:: How a minor mode can have its own keymap.
  703. * Defining Minor Modes:: A convenient facility for defining minor modes.
  704. Mode Line Format
  705. * Mode Line Basics:: Basic ideas of mode line control.
  706. * Mode Line Data:: The data structure that controls the mode line.
  707. * Mode Line Top:: The top level variable, mode-line-format.
  708. * Mode Line Variables:: Variables used in that data structure.
  709. * %-Constructs:: Putting information into a mode line.
  710. * Properties in Mode:: Using text properties in the mode line.
  711. * Header Lines:: Like a mode line, but at the top.
  712. * Emulating Mode Line:: Formatting text as the mode line would.
  713. Font Lock Mode
  714. * Font Lock Basics:: Overview of customizing Font Lock.
  715. * Search-based Fontification:: Fontification based on regexps.
  716. * Customizing Keywords:: Customizing search-based fontification.
  717. * Other Font Lock Variables:: Additional customization facilities.
  718. * Levels of Font Lock:: Each mode can define alternative levels
  719. so that the user can select more or less.
  720. * Precalculated Fontification:: How Lisp programs that produce the buffer
  721. contents can also specify how to fontify it.
  722. * Faces for Font Lock:: Special faces specifically for Font Lock.
  723. * Syntactic Font Lock:: Fontification based on syntax tables.
  724. * Multiline Font Lock:: How to coerce Font Lock into properly
  725. highlighting multiline constructs.
  726. Multiline Font Lock Constructs
  727. * Font Lock Multiline:: Marking multiline chunks with a text property.
  728. * Region to Refontify:: Controlling which region gets refontified
  729. after a buffer change.
  730. Automatic Indentation of code
  731. * SMIE:: A simple minded indentation engine.
  732. Simple Minded Indentation Engine
  733. * SMIE setup:: SMIE setup and features.
  734. * Operator Precedence Grammars:: A very simple parsing technique.
  735. * SMIE Grammar:: Defining the grammar of a language.
  736. * SMIE Lexer:: Defining tokens.
  737. * SMIE Tricks:: Working around the parser's limitations.
  738. * SMIE Indentation:: Specifying indentation rules.
  739. * SMIE Indentation Helpers:: Helper functions for indentation rules.
  740. * SMIE Indentation Example:: Sample indentation rules.
  741. * SMIE Customization:: Customizing indentation.
  742. Documentation
  743. * Documentation Basics:: Where doc strings are defined and stored.
  744. * Accessing Documentation:: How Lisp programs can access doc strings.
  745. * Keys in Documentation:: Substituting current key bindings.
  746. * Describing Characters:: Making printable descriptions of
  747. non-printing characters and key sequences.
  748. * Help Functions:: Subroutines used by Emacs help facilities.
  749. Files
  750. * Visiting Files:: Reading files into Emacs buffers for editing.
  751. * Saving Buffers:: Writing changed buffers back into files.
  752. * Reading from Files:: Reading files into buffers without visiting.
  753. * Writing to Files:: Writing new files from parts of buffers.
  754. * File Locks:: Locking and unlocking files, to prevent
  755. simultaneous editing by two people.
  756. * Information about Files:: Testing existence, accessibility, size of files.
  757. * Changing Files:: Renaming files, changing permissions, etc.
  758. * File Names:: Decomposing and expanding file names.
  759. * Contents of Directories:: Getting a list of the files in a directory.
  760. * Create/Delete Dirs:: Creating and Deleting Directories.
  761. * Magic File Names:: Special handling for certain file names.
  762. * Format Conversion:: Conversion to and from various file formats.
  763. Visiting Files
  764. * Visiting Functions:: The usual interface functions for visiting.
  765. * Subroutines of Visiting:: Lower-level subroutines that they use.
  766. Information about Files
  767. * Testing Accessibility:: Is a given file readable? Writable?
  768. * Kinds of Files:: Is it a directory? A symbolic link?
  769. * Truenames:: Eliminating symbolic links from a file name.
  770. * File Attributes:: File sizes, modification times, etc.
  771. * Extended Attributes:: Extended file attributes for access control.
  772. * Locating Files:: How to find a file in standard places.
  773. File Names
  774. * File Name Components:: The directory part of a file name, and the rest.
  775. * Relative File Names:: Some file names are relative to a current directory.
  776. * Directory Names:: A directory's name as a directory
  777. is different from its name as a file.
  778. * File Name Expansion:: Converting relative file names to absolute ones.
  779. * Unique File Names:: Generating names for temporary files.
  780. * File Name Completion:: Finding the completions for a given file name.
  781. * Standard File Names:: If your package uses a fixed file name,
  782. how to handle various operating systems simply.
  783. File Format Conversion
  784. * Format Conversion Overview:: @code{insert-file-contents} and @code{write-region}.
  785. * Format Conversion Round-Trip:: Using @code{format-alist}.
  786. * Format Conversion Piecemeal:: Specifying non-paired conversion.
  787. Backups and Auto-Saving
  788. * Backup Files:: How backup files are made; how their names
  789. are chosen.
  790. * Auto-Saving:: How auto-save files are made; how their
  791. names are chosen.
  792. * Reverting:: @code{revert-buffer}, and how to customize
  793. what it does.
  794. Backup Files
  795. * Making Backups:: How Emacs makes backup files, and when.
  796. * Rename or Copy:: Two alternatives: renaming the old file
  797. or copying it.
  798. * Numbered Backups:: Keeping multiple backups for each source file.
  799. * Backup Names:: How backup file names are computed; customization.
  800. Buffers
  801. * Buffer Basics:: What is a buffer?
  802. * Current Buffer:: Designating a buffer as current
  803. so that primitives will access its contents.
  804. * Buffer Names:: Accessing and changing buffer names.
  805. * Buffer File Name:: The buffer file name indicates which file
  806. is visited.
  807. * Buffer Modification:: A buffer is @dfn{modified} if it needs to be saved.
  808. * Modification Time:: Determining whether the visited file was changed
  809. "behind Emacs's back".
  810. * Read Only Buffers:: Modifying text is not allowed in a
  811. read-only buffer.
  812. * Buffer List:: How to look at all the existing buffers.
  813. * Creating Buffers:: Functions that create buffers.
  814. * Killing Buffers:: Buffers exist until explicitly killed.
  815. * Indirect Buffers:: An indirect buffer shares text with some
  816. other buffer.
  817. * Swapping Text:: Swapping text between two buffers.
  818. * Buffer Gap:: The gap in the buffer.
  819. Windows
  820. * Basic Windows:: Basic information on using windows.
  821. * Windows and Frames:: Relating windows to the frame they appear on.
  822. * Window Sizes:: Accessing a window's size.
  823. * Resizing Windows:: Changing the sizes of windows.
  824. * Preserving Window Sizes:: Preserving the size of windows.
  825. * Splitting Windows:: Splitting one window into two windows.
  826. * Deleting Windows:: Deleting a window gives its space to other windows.
  827. * Recombining Windows:: Preserving the frame layout when splitting and
  828. deleting windows.
  829. * Selecting Windows:: The selected window is the one that you edit in.
  830. * Cyclic Window Ordering:: Moving around the existing windows.
  831. * Buffers and Windows:: Each window displays the contents of a buffer.
  832. * Switching Buffers:: Higher-level functions for switching to a buffer.
  833. * Choosing Window:: How to choose a window for displaying a buffer.
  834. * Display Action Functions:: Subroutines for @code{display-buffer}.
  835. * Choosing Window Options:: Extra options affecting how buffers are displayed.
  836. * Window History:: Each window remembers the buffers displayed in it.
  837. * Dedicated Windows:: How to avoid displaying another buffer in
  838. a specific window.
  839. * Quitting Windows:: How to restore the state prior to displaying a
  840. buffer.
  841. * Window Point:: Each window has its own location of point.
  842. * Window Start and End:: Buffer positions indicating which text is
  843. on-screen in a window.
  844. * Textual Scrolling:: Moving text up and down through the window.
  845. * Vertical Scrolling:: Moving the contents up and down on the window.
  846. * Horizontal Scrolling:: Moving the contents sideways on the window.
  847. * Coordinates and Windows:: Converting coordinates to windows.
  848. * Window Configurations:: Saving and restoring the state of the screen.
  849. * Window Parameters:: Associating additional information with windows.
  850. * Window Hooks:: Hooks for scrolling, window size changes,
  851. redisplay going past a certain point,
  852. or window configuration changes.
  853. Frames
  854. * Creating Frames:: Creating additional frames.
  855. * Multiple Terminals:: Displaying on several different devices.
  856. * Frame Parameters:: Controlling frame size, position, font, etc.
  857. * Terminal Parameters:: Parameters common for all frames on terminal.
  858. * Frame Titles:: Automatic updating of frame titles.
  859. * Deleting Frames:: Frames last until explicitly deleted.
  860. * Finding All Frames:: How to examine all existing frames.
  861. * Minibuffers and Frames:: How a frame finds the minibuffer to use.
  862. * Input Focus:: Specifying the selected frame.
  863. * Visibility of Frames:: Frames may be visible or invisible, or icons.
  864. * Raising and Lowering:: Raising a frame makes it hide other windows;
  865. lowering it makes the others hide it.
  866. * Frame Configurations:: Saving the state of all frames.
  867. * Mouse Tracking:: Getting events that say when the mouse moves.
  868. * Mouse Position:: Asking where the mouse is, or moving it.
  869. * Pop-Up Menus:: Displaying a menu for the user to select from.
  870. * Dialog Boxes:: Displaying a box to ask yes or no.
  871. * Pointer Shape:: Specifying the shape of the mouse pointer.
  872. * Window System Selections::Transferring text to and from other X clients.
  873. * Drag and Drop:: Internals of Drag-and-Drop implementation.
  874. * Color Names:: Getting the definitions of color names.
  875. * Text Terminal Colors:: Defining colors for text terminals.
  876. * Resources:: Getting resource values from the server.
  877. * Display Feature Testing:: Determining the features of a terminal.
  878. Frame Parameters
  879. * Parameter Access:: How to change a frame's parameters.
  880. * Initial Parameters:: Specifying frame parameters when you make a frame.
  881. * Window Frame Parameters:: List of frame parameters for window systems.
  882. * Size and Position:: Changing the size and position of a frame.
  883. * Geometry:: Parsing geometry specifications.
  884. Window Frame Parameters
  885. * Basic Parameters:: Parameters that are fundamental.
  886. * Position Parameters:: The position of the frame on the screen.
  887. * Size Parameters:: Frame's size.
  888. * Layout Parameters:: Size of parts of the frame, and
  889. enabling or disabling some parts.
  890. * Buffer Parameters:: Which buffers have been or should be shown.
  891. * Management Parameters:: Communicating with the window manager.
  892. * Cursor Parameters:: Controlling the cursor appearance.
  893. * Font and Color Parameters:: Fonts and colors for the frame text.
  894. Positions
  895. * Point:: The special position where editing takes place.
  896. * Motion:: Changing point.
  897. * Excursions:: Temporary motion and buffer changes.
  898. * Narrowing:: Restricting editing to a portion of the buffer.
  899. Motion
  900. * Character Motion:: Moving in terms of characters.
  901. * Word Motion:: Moving in terms of words.
  902. * Buffer End Motion:: Moving to the beginning or end of the buffer.
  903. * Text Lines:: Moving in terms of lines of text.
  904. * Screen Lines:: Moving in terms of lines as displayed.
  905. * List Motion:: Moving by parsing lists and sexps.
  906. * Skipping Characters:: Skipping characters belonging to a certain set.
  907. Markers
  908. * Overview of Markers:: The components of a marker, and how it relocates.
  909. * Predicates on Markers:: Testing whether an object is a marker.
  910. * Creating Markers:: Making empty markers or markers at certain places.
  911. * Information from Markers::Finding the marker's buffer or character position.
  912. * Marker Insertion Types:: Two ways a marker can relocate when you
  913. insert where it points.
  914. * Moving Markers:: Moving the marker to a new buffer or position.
  915. * The Mark:: How "the mark" is implemented with a marker.
  916. * The Region:: How to access "the region".
  917. Text
  918. * Near Point:: Examining text in the vicinity of point.
  919. * Buffer Contents:: Examining text in a general fashion.
  920. * Comparing Text:: Comparing substrings of buffers.
  921. * Insertion:: Adding new text to a buffer.
  922. * Commands for Insertion:: User-level commands to insert text.
  923. * Deletion:: Removing text from a buffer.
  924. * User-Level Deletion:: User-level commands to delete text.
  925. * The Kill Ring:: Where removed text sometimes is saved for
  926. later use.
  927. * Undo:: Undoing changes to the text of a buffer.
  928. * Maintaining Undo:: How to enable and disable undo information.
  929. How to control how much information is kept.
  930. * Filling:: Functions for explicit filling.
  931. * Margins:: How to specify margins for filling commands.
  932. * Adaptive Fill:: Adaptive Fill mode chooses a fill prefix
  933. from context.
  934. * Auto Filling:: How auto-fill mode is implemented to break lines.
  935. * Sorting:: Functions for sorting parts of the buffer.
  936. * Columns:: Computing horizontal positions, and using them.
  937. * Indentation:: Functions to insert or adjust indentation.
  938. * Case Changes:: Case conversion of parts of the buffer.
  939. * Text Properties:: Assigning Lisp property lists to text characters.
  940. * Substitution:: Replacing a given character wherever it appears.
  941. * Registers:: How registers are implemented. Accessing
  942. the text or position stored in a register.
  943. * Transposition:: Swapping two portions of a buffer.
  944. * Decompression:: Dealing with compressed data.
  945. * Base 64:: Conversion to or from base 64 encoding.
  946. * Checksum/Hash:: Computing cryptographic hashes.
  947. * Parsing HTML/XML:: Parsing HTML and XML.
  948. * Atomic Changes:: Installing several buffer changes "atomically".
  949. * Change Hooks:: Supplying functions to be run when text is changed.
  950. The Kill Ring
  951. * Kill Ring Concepts:: What text looks like in the kill ring.
  952. * Kill Functions:: Functions that kill text.
  953. * Yanking:: How yanking is done.
  954. * Yank Commands:: Commands that access the kill ring.
  955. * Low-Level Kill Ring:: Functions and variables for kill ring access.
  956. * Internals of Kill Ring:: Variables that hold kill ring data.
  957. Indentation
  958. * Primitive Indent:: Functions used to count and insert indentation.
  959. * Mode-Specific Indent:: Customize indentation for different modes.
  960. * Region Indent:: Indent all the lines in a region.
  961. * Relative Indent:: Indent the current line based on previous lines.
  962. * Indent Tabs:: Adjustable, typewriter-like tab stops.
  963. * Motion by Indent:: Move to first non-blank character.
  964. Text Properties
  965. * Examining Properties:: Looking at the properties of one character.
  966. * Changing Properties:: Setting the properties of a range of text.
  967. * Property Search:: Searching for where a property changes value.
  968. * Special Properties:: Particular properties with special meanings.
  969. * Format Properties:: Properties for representing formatting of text.
  970. * Sticky Properties:: How inserted text gets properties from
  971. neighboring text.
  972. * Lazy Properties:: Computing text properties in a lazy fashion
  973. only when text is examined.
  974. * Clickable Text:: Using text properties to make regions of text
  975. do something when you click on them.
  976. * Fields:: The @code{field} property defines
  977. fields within the buffer.
  978. * Not Intervals:: Why text properties do not use
  979. Lisp-visible text intervals.
  980. Non-@acronym{ASCII} Characters
  981. * Text Representations:: How Emacs represents text.
  982. * Disabling Multibyte:: Controlling whether to use multibyte characters.
  983. * Converting Representations:: Converting unibyte to multibyte and vice versa.
  984. * Selecting a Representation:: Treating a byte sequence as unibyte or multi.
  985. * Character Codes:: How unibyte and multibyte relate to
  986. codes of individual characters.
  987. * Character Properties:: Character attributes that define their
  988. behavior and handling.
  989. * Character Sets:: The space of possible character codes
  990. is divided into various character sets.
  991. * Scanning Charsets:: Which character sets are used in a buffer?
  992. * Translation of Characters:: Translation tables are used for conversion.
  993. * Coding Systems:: Coding systems are conversions for saving files.
  994. * Input Methods:: Input methods allow users to enter various
  995. non-ASCII characters without special keyboards.
  996. * Locales:: Interacting with the POSIX locale.
  997. Coding Systems
  998. * Coding System Basics:: Basic concepts.
  999. * Encoding and I/O:: How file I/O functions handle coding systems.
  1000. * Lisp and Coding Systems:: Functions to operate on coding system names.
  1001. * User-Chosen Coding Systems:: Asking the user to choose a coding system.
  1002. * Default Coding Systems:: Controlling the default choices.
  1003. * Specifying Coding Systems:: Requesting a particular coding system
  1004. for a single file operation.
  1005. * Explicit Encoding:: Encoding or decoding text without doing I/O.
  1006. * Terminal I/O Encoding:: Use of encoding for terminal I/O.
  1007. Searching and Matching
  1008. * String Search:: Search for an exact match.
  1009. * Searching and Case:: Case-independent or case-significant searching.
  1010. * Regular Expressions:: Describing classes of strings.
  1011. * Regexp Search:: Searching for a match for a regexp.
  1012. * POSIX Regexps:: Searching POSIX-style for the longest match.
  1013. * Match Data:: Finding out which part of the text matched,
  1014. after a string or regexp search.
  1015. * Search and Replace:: Commands that loop, searching and replacing.
  1016. * Standard Regexps:: Useful regexps for finding sentences, pages,...
  1017. Regular Expressions
  1018. * Syntax of Regexps:: Rules for writing regular expressions.
  1019. * Regexp Example:: Illustrates regular expression syntax.
  1020. * Regexp Functions:: Functions for operating on regular expressions.
  1021. Syntax of Regular Expressions
  1022. * Regexp Special:: Special characters in regular expressions.
  1023. * Char Classes:: Character classes used in regular expressions.
  1024. * Regexp Backslash:: Backslash-sequences in regular expressions.
  1025. The Match Data
  1026. * Replacing Match:: Replacing a substring that was matched.
  1027. * Simple Match Data:: Accessing single items of match data,
  1028. such as where a particular subexpression started.
  1029. * Entire Match Data:: Accessing the entire match data at once, as a list.
  1030. * Saving Match Data:: Saving and restoring the match data.
  1031. Syntax Tables
  1032. * Syntax Basics:: Basic concepts of syntax tables.
  1033. * Syntax Descriptors:: How characters are classified.
  1034. * Syntax Table Functions:: How to create, examine and alter syntax tables.
  1035. * Syntax Properties:: Overriding syntax with text properties.
  1036. * Motion and Syntax:: Moving over characters with certain syntaxes.
  1037. * Parsing Expressions:: Parsing balanced expressions
  1038. using the syntax table.
  1039. * Syntax Table Internals:: How syntax table information is stored.
  1040. * Categories:: Another way of classifying character syntax.
  1041. Syntax Descriptors
  1042. * Syntax Class Table:: Table of syntax classes.
  1043. * Syntax Flags:: Additional flags each character can have.
  1044. Parsing Expressions
  1045. * Motion via Parsing:: Motion functions that work by parsing.
  1046. * Position Parse:: Determining the syntactic state of a position.
  1047. * Parser State:: How Emacs represents a syntactic state.
  1048. * Low-Level Parsing:: Parsing across a specified region.
  1049. * Control Parsing:: Parameters that affect parsing.
  1050. Abbrevs and Abbrev Expansion
  1051. * Abbrev Tables:: Creating and working with abbrev tables.
  1052. * Defining Abbrevs:: Specifying abbreviations and their expansions.
  1053. * Abbrev Files:: Saving abbrevs in files.
  1054. * Abbrev Expansion:: Controlling expansion; expansion subroutines.
  1055. * Standard Abbrev Tables:: Abbrev tables used by various major modes.
  1056. * Abbrev Properties:: How to read and set abbrev properties.
  1057. Which properties have which effect.
  1058. * Abbrev Table Properties:: How to read and set abbrev table properties.
  1059. Which properties have which effect.
  1060. Processes
  1061. * Subprocess Creation:: Functions that start subprocesses.
  1062. * Shell Arguments:: Quoting an argument to pass it to a shell.
  1063. * Synchronous Processes:: Details of using synchronous subprocesses.
  1064. * Asynchronous Processes:: Starting up an asynchronous subprocess.
  1065. * Deleting Processes:: Eliminating an asynchronous subprocess.
  1066. * Process Information:: Accessing run-status and other attributes.
  1067. * Input to Processes:: Sending input to an asynchronous subprocess.
  1068. * Signals to Processes:: Stopping, continuing or interrupting
  1069. an asynchronous subprocess.
  1070. * Output from Processes:: Collecting output from an asynchronous subprocess.
  1071. * Sentinels:: Sentinels run when process run-status changes.
  1072. * Query Before Exit:: Whether to query if exiting will kill a process.
  1073. * System Processes:: Accessing other processes running on your system.
  1074. * Transaction Queues:: Transaction-based communication with subprocesses.
  1075. * Network:: Opening network connections.
  1076. * Network Servers:: Network servers let Emacs accept net connections.
  1077. * Datagrams:: UDP network connections.
  1078. * Low-Level Network:: Lower-level but more general function
  1079. to create connections and servers.
  1080. * Misc Network:: Additional relevant functions for net connections.
  1081. * Serial Ports:: Communicating with serial ports.
  1082. * Byte Packing:: Using bindat to pack and unpack binary data.
  1083. Receiving Output from Processes
  1084. * Process Buffers:: By default, output is put in a buffer.
  1085. * Filter Functions:: Filter functions accept output from the process.
  1086. * Decoding Output:: Filters can get unibyte or multibyte strings.
  1087. * Accepting Output:: How to wait until process output arrives.
  1088. Low-Level Network Access
  1089. * Network Processes:: Using @code{make-network-process}.
  1090. * Network Options:: Further control over network connections.
  1091. * Network Feature Testing:: Determining which network features work on
  1092. the machine you are using.
  1093. Packing and Unpacking Byte Arrays
  1094. * Bindat Spec:: Describing data layout.
  1095. * Bindat Functions:: Doing the unpacking and packing.
  1096. * Bindat Examples:: Samples of what bindat.el can do for you!
  1097. Emacs Display
  1098. * Refresh Screen:: Clearing the screen and redrawing everything on it.
  1099. * Forcing Redisplay:: Forcing redisplay.
  1100. * Truncation:: Folding or wrapping long text lines.
  1101. * The Echo Area:: Displaying messages at the bottom of the screen.
  1102. * Warnings:: Displaying warning messages for the user.
  1103. * Invisible Text:: Hiding part of the buffer text.
  1104. * Selective Display:: Hiding part of the buffer text (the old way).
  1105. * Temporary Displays:: Displays that go away automatically.
  1106. * Overlays:: Use overlays to highlight parts of the buffer.
  1107. * Size of Displayed Text:: How large displayed text is.
  1108. * Line Height:: Controlling the height of lines.
  1109. * Faces:: A face defines a graphics style
  1110. for text characters: font, colors, etc.
  1111. * Fringes:: Controlling window fringes.
  1112. * Scroll Bars:: Controlling scroll bars.
  1113. * Window Dividers:: Separating windows visually.
  1114. * Display Property:: Enabling special display features.
  1115. * Images:: Displaying images in Emacs buffers.
  1116. * Buttons:: Adding clickable buttons to Emacs buffers.
  1117. * Abstract Display:: Emacs's Widget for Object Collections.
  1118. * Blinking:: How Emacs shows the matching open parenthesis.
  1119. * Character Display:: How Emacs displays individual characters.
  1120. * Beeping:: Audible signal to the user.
  1121. * Window Systems:: Which window system is being used.
  1122. * Bidirectional Display:: Display of bidirectional scripts, such as
  1123. Arabic and Farsi.
  1124. The Echo Area
  1125. * Displaying Messages:: Explicitly displaying text in the echo area.
  1126. * Progress:: Informing user about progress of a long operation.
  1127. * Logging Messages:: Echo area messages are logged for the user.
  1128. * Echo Area Customization:: Controlling the echo area.
  1129. Reporting Warnings
  1130. * Warning Basics:: Warnings concepts and functions to report them.
  1131. * Warning Variables:: Variables programs bind to customize
  1132. their warnings.
  1133. * Warning Options:: Variables users set to control display of warnings.
  1134. * Delayed Warnings:: Deferring a warning until the end of a command.
  1135. Overlays
  1136. * Managing Overlays:: Creating and moving overlays.
  1137. * Overlay Properties:: How to read and set properties.
  1138. What properties do to the screen display.
  1139. * Finding Overlays:: Searching for overlays.
  1140. Faces
  1141. * Face Attributes:: What is in a face?
  1142. * Defining Faces:: How to define a face.
  1143. * Attribute Functions:: Functions to examine and set face attributes.
  1144. * Displaying Faces:: How Emacs combines the faces specified for
  1145. a character.
  1146. * Face Remapping:: Remapping faces to alternative definitions.
  1147. * Face Functions:: How to define and examine faces.
  1148. * Auto Faces:: Hook for automatic face assignment.
  1149. * Basic Faces:: Faces that are defined by default.
  1150. * Font Selection:: Finding the best available font for a face.
  1151. * Font Lookup:: Looking up the names of available fonts
  1152. and information about them.
  1153. * Fontsets:: A fontset is a collection of fonts
  1154. that handle a range of character sets.
  1155. * Low-Level Font:: Lisp representation for character display fonts.
  1156. Fringes
  1157. * Fringe Size/Pos:: Specifying where to put the window fringes.
  1158. * Fringe Indicators:: Displaying indicator icons in the window fringes.
  1159. * Fringe Cursors:: Displaying cursors in the right fringe.
  1160. * Fringe Bitmaps:: Specifying bitmaps for fringe indicators.
  1161. * Customizing Bitmaps:: Specifying your own bitmaps to use in the fringes.
  1162. * Overlay Arrow:: Display of an arrow to indicate position.
  1163. The @code{display} Property
  1164. * Replacing Specs:: Display specs that replace the text.
  1165. * Specified Space:: Displaying one space with a specified width.
  1166. * Pixel Specification:: Specifying space width or height in pixels.
  1167. * Other Display Specs:: Displaying an image; adjusting the height,
  1168. spacing, and other properties of text.
  1169. * Display Margins:: Displaying text or images to the side of
  1170. the main text.
  1171. Images
  1172. * Image Formats:: Supported image formats.
  1173. * Image Descriptors:: How to specify an image for use in @code{:display}.
  1174. * XBM Images:: Special features for XBM format.
  1175. * XPM Images:: Special features for XPM format.
  1176. * PostScript Images:: Special features for PostScript format.
  1177. * ImageMagick Images:: Special features available through ImageMagick.
  1178. * Other Image Types:: Various other formats are supported.
  1179. * Defining Images:: Convenient ways to define an image for later use.
  1180. * Showing Images:: Convenient ways to display an image once
  1181. it is defined.
  1182. * Multi-Frame Images:: Some images contain more than one frame.
  1183. * Image Cache:: Internal mechanisms of image display.
  1184. Buttons
  1185. * Button Properties:: Button properties with special meanings.
  1186. * Button Types:: Defining common properties for classes of buttons.
  1187. * Making Buttons:: Adding buttons to Emacs buffers.
  1188. * Manipulating Buttons:: Getting and setting properties of buttons.
  1189. * Button Buffer Commands:: Buffer-wide commands and bindings for buttons.
  1190. Abstract Display
  1191. * Abstract Display Functions:: Functions in the Ewoc package.
  1192. * Abstract Display Example:: Example of using Ewoc.
  1193. Character Display
  1194. * Usual Display:: The usual conventions for displaying characters.
  1195. * Display Tables:: What a display table consists of.
  1196. * Active Display Table:: How Emacs selects a display table to use.
  1197. * Glyphs:: How to define a glyph, and what glyphs mean.
  1198. * Glyphless Chars:: How glyphless characters are drawn.
  1199. Operating System Interface
  1200. * Starting Up:: Customizing Emacs startup processing.
  1201. * Getting Out:: How exiting works (permanent or temporary).
  1202. * System Environment:: Distinguish the name and kind of system.
  1203. * User Identification:: Finding the name and user id of the user.
  1204. * Time of Day:: Getting the current time.
  1205. * Time Conversion:: Converting a time from numeric form to
  1206. calendrical data and vice versa.
  1207. * Time Parsing:: Converting a time from numeric form to text
  1208. and vice versa.
  1209. * Processor Run Time:: Getting the run time used by Emacs.
  1210. * Time Calculations:: Adding, subtracting, comparing times, etc.
  1211. * Timers:: Setting a timer to call a function at a
  1212. certain time.
  1213. * Idle Timers:: Setting a timer to call a function when Emacs has
  1214. been idle for a certain length of time.
  1215. * Terminal Input:: Accessing and recording terminal input.
  1216. * Terminal Output:: Controlling and recording terminal output.
  1217. * Sound Output:: Playing sounds on the computer's speaker.
  1218. * X11 Keysyms:: Operating on key symbols for X Windows.
  1219. * Batch Mode:: Running Emacs without terminal interaction.
  1220. * Session Management:: Saving and restoring state with
  1221. X Session Management.
  1222. * Desktop Notifications:: Desktop notifications.
  1223. * File Notifications:: File notifications.
  1224. * Dynamic Libraries:: On-demand loading of support libraries.
  1225. Starting Up Emacs
  1226. * Startup Summary:: Sequence of actions Emacs performs at startup.
  1227. * Init File:: Details on reading the init file.
  1228. * Terminal-Specific:: How the terminal-specific Lisp file is read.
  1229. * Command-Line Arguments:: How command-line arguments are processed,
  1230. and how you can customize them.
  1231. Getting Out of Emacs
  1232. * Killing Emacs:: Exiting Emacs irreversibly.
  1233. * Suspending Emacs:: Exiting Emacs reversibly.
  1234. Terminal Input
  1235. * Input Modes:: Options for how input is processed.
  1236. * Recording Input:: Saving histories of recent or all input events.
  1237. Preparing Lisp code for distribution
  1238. * Packaging Basics:: The basic concepts of Emacs Lisp packages.
  1239. * Simple Packages:: How to package a single .el file.
  1240. * Multi-file Packages:: How to package multiple files.
  1241. * Package Archives:: Maintaining package archives.
  1242. Tips and Conventions
  1243. * Coding Conventions:: Conventions for clean and robust programs.
  1244. * Key Binding Conventions:: Which keys should be bound by which programs.
  1245. * Programming Tips:: Making Emacs code fit smoothly in Emacs.
  1246. * Compilation Tips:: Making compiled code run fast.
  1247. * Warning Tips:: Turning off compiler warnings.
  1248. * Documentation Tips:: Writing readable documentation strings.
  1249. * Comment Tips:: Conventions for writing comments.
  1250. * Library Headers:: Standard headers for library packages.
  1251. GNU Emacs Internals
  1252. * Building Emacs:: How the dumped Emacs is made.
  1253. * Pure Storage:: Kludge to make preloaded Lisp functions shareable.
  1254. * Garbage Collection:: Reclaiming space for Lisp objects no longer used.
  1255. * Memory Usage:: Info about total size of Lisp objects made so far.
  1256. * Writing Emacs Primitives:: Writing C code for Emacs.
  1257. * Object Internals:: Data formats of buffers, windows, processes.
  1258. Object Internals
  1259. * Buffer Internals:: Components of a buffer structure.
  1260. * Window Internals:: Components of a window structure.
  1261. * Process Internals:: Components of a process structure.
  1262. @end detailmenu
  1263. @end menu
  1264. @ifclear VOL2
  1265. @include intro.texi
  1266. @include objects.texi
  1267. @include numbers.texi
  1268. @include strings.texi
  1269. @include lists.texi
  1270. @include sequences.texi
  1271. @include hash.texi
  1272. @include symbols.texi
  1273. @include eval.texi
  1274. @include control.texi
  1275. @include variables.texi
  1276. @include functions.texi
  1277. @include macros.texi
  1278. @include customize.texi
  1279. @include loading.texi
  1280. @include compile.texi
  1281. @c This includes edebug.texi.
  1282. @include debugging.texi
  1283. @include streams.texi
  1284. @include minibuf.texi
  1285. @include commands.texi
  1286. @include keymaps.texi
  1287. @include modes.texi
  1288. @include help.texi
  1289. @include files.texi
  1290. @include backups.texi
  1291. @end ifclear
  1292. @c ================ Beginning of Volume 2 ================
  1293. @ifclear VOL1
  1294. @include buffers.texi
  1295. @include windows.texi
  1296. @include frames.texi
  1297. @include positions.texi
  1298. @include markers.texi
  1299. @include text.texi
  1300. @include nonascii.texi
  1301. @include searching.texi
  1302. @include syntax.texi
  1303. @include abbrevs.texi
  1304. @include processes.texi
  1305. @include display.texi
  1306. @include os.texi
  1307. @include package.texi
  1308. @c appendices
  1309. @include anti.texi
  1310. @node GNU Free Documentation License
  1311. @appendix GNU Free Documentation License
  1312. @include doclicense.texi
  1313. @node GPL
  1314. @appendix GNU General Public License
  1315. @include gpl.texi
  1316. @include tips.texi
  1317. @include internals.texi
  1318. @include errors.texi
  1319. @include maps.texi
  1320. @include hooks.texi
  1321. @include index.texi
  1322. @end ifclear
  1323. @ignore
  1324. @node New Symbols
  1325. @unnumbered New Symbols Since the Previous Edition
  1326. @printindex tp
  1327. @end ignore
  1328. @bye
  1329. These words prevent "local variables" above from confusing Emacs.