📄 emacs.tex
字号:
* Compilation:: Compiling programs in languages other than Lisp (C, Pascal, etc.)* Lisp Modes:: Various modes for editing Lisp programs, with different facilities for running the Lisp programs.* Lisp Libraries:: Creating Lisp programs to run in Emacs.* Lisp Interaction:: Executing Lisp in an Emacs buffer.* Lisp Eval:: Executing a single Lisp expression in Emacs.* Lisp Debug:: Debugging Lisp programs running in Emacs.* External Lisp:: Communicating through Emacs with a separate Lisp.Subnodes of Abbrevs* Defining Abbrevs:: Defining an abbrev, so it will expand when typed.* Expanding Abbrevs:: Controlling expansion: prefixes, canceling expansion.* Editing Abbrevs:: Viewing or editing the entire list of defined abbrevs.* Saving Abbrevs:: Saving the entire list of abbrevs for another session.* Dynamic Abbrevs:: Abbreviations for words already in the buffer.Subnodes of Picture* Basic Picture:: Basic concepts and simple commands of Picture Mode.* Insert in Picture:: Controlling direction of cursor motion after "self-inserting" characters.* Tabs in Picture:: Various features for tab stops and indentation.* Rectangles in Picture:: Clearing and superimposing rectangles.Subnodes of Sending Mail* Mail Format:: Format of the mail being composed.* Mail Headers:: Details of allowed mail header fields.* Mail Mode:: Special commands for editing mail being composed.Subnodes of Rmail* Rmail Scrolling:: Scrolling through a message.* Rmail Motion:: Moving to another message.* Rmail Deletion:: Deleting and expunging messages.* Rmail Inbox:: How mail gets into the Rmail file.* Rmail Files:: Using multiple Rmail files.* Rmail Output:: Copying message out to files.* Rmail Labels:: Classifying messages by labeling them.* Rmail Summary:: Summaries show brief info on many messages.* Rmail Reply:: Sending replies to messages you are viewing.* Rmail Editing:: Editing message text and headers in Rmail.* Rmail Digest:: Extracting the messages from a digest message.Subnodes of Shell* Single Shell:: Commands to run one shell command and return.* Interactive Shell:: Permanent shell taking input via Emacs.* Shell Mode:: Special Emacs commands used with permanent shell.Subnodes of Customization* Minor Modes:: Each minor mode is one feature you can turn on independently of any others.* Variables:: Many Emacs commands examine Emacs variables to decide what to do; by setting variables, you can control their functioning.* Examining:: Examining or setting one variable's value.* Edit Options:: Examining or editing list of all variables' values.* Locals:: Per-buffer values of variables.* File Variables:: How files can specify variable values.* Keyboard Macros:: A keyboard macro records a sequence of keystrokes to be replayed with a single command.* Key Bindings:: The keymaps say what command each key runs. By changing them, you can "redefine keys".* Keymaps:: Definition of the keymap data structure.* Rebinding:: How to redefine one key's meaning conveniently.* Disabling:: Disabling a command means confirmation is required before it can be executed. This is done to protect beginners from surprises.* Syntax:: The syntax table controls how words and expressions are parsed.* Init File:: How to write common customizations in the `.emacs' file.Subnodes of Lossage (and recovery)* Stuck Recursive:: `[...]' in mode line around the parentheses.* Screen Garbled:: Garbage on the screen.* Text Garbled:: Garbage in the text.* Unasked-for Search::Spontaneous entry to incremental search.* Emergency Escape:: Emergency escape--- What to do if Emacs stops responding.* Total Frustration:: When you are at your wits' end.@end menu@iftex@unnumbered Preface This manual documents the use and simple customization of theEmacs editor. The reader is not expected to be a programmer. Even simplecustomizations do not require programming skill, but the user who is notinterested in customizing can ignore the scattered customization hints. This is primarily a reference manual, but can also be used as aprimer. However, I recommend that the newcomer first use the on-line,learn-by-doing tutorial, which you get by running Emacs and typing@kbd{C-h t}. With it, you learn Emacs by using Emacs on a speciallydesigned file which describes commands, tells you when to try them,and then explains the results you see. This gives a more vividintroduction than a printed manual. On first reading, just skim chapters one and two, which describe thenotational conventions of the manual and the general appearance of theEmacs display screen. Note which questions are answered in these chapters,so you can refer back later. After reading chapter four you shouldpractice the commands there. The next few chapters describe fundamentaltechniques and concepts that are used constantly. You need to understandthem thoroughly, experimenting with them if necessary. To find the documentation on a particular command, look in the index.Keys (character commands) and command names have separate indexes. Thereis also a glossary, with a cross reference for each term.@ignore If you know vaguely what the commanddoes, look in the command summary. The command summary contains a line ortwo about each command, and a cross reference to the section of themanual that describes the command in more detail; related commandsare grouped together.@end ignore This manual comes in two forms: the published form and the Info form.The Info form is for on-line perusal with the INFO program; it isdistributed along with GNU Emacs. Both forms contain substantially thesame text and are generated from a common source file, which is alsodistributed along with GNU Emacs. GNU Emacs is a member of the Emacs editor family. There are many Emacseditors, all sharing common principles of organization. For information onthe underlying philosophy of Emacs and the lessons learned from itsdevelopment, write for a copy of AI memo 519a, ``Emacs, the Extensible,Customizable Self-Documenting Display Editor'', to Publications Department,Artificial Intelligence Lab, 545 Tech Square, Cambridge, MA 02139, USA. Atlast report they charge $2.25 per copy. Another useful publication is LCSTM-165, ``A Cookbook for an Emacs'', by Craig Finseth, available fromPublications Department, Laboratory for Computer Science, 545 Tech Square,Cambridge, MA 02139, USA. The price today is $3.This edition of the manual is intended for use with GNU Emacs installed onUnix systems. GNU Emacs can also be used on VMS systems, which havedifferent file name syntax and do not support all GNU Emacs features. AVMS edition of this manual may appear in the future.@end iftex@node Distrib, License, Top, Top@unnumbered DistributionGNU Emacs is @dfn{free}; this means that everyone is free to use it andfree to redistribute it on a free basis. GNU Emacs is not in the publicdomain; it is copyrighted and there are restrictions on itsdistribution, but these restrictions are designed to permit everythingthat a good cooperating citizen would want to do. What is not allowedis to try to prevent others from further sharing any version of GNUEmacs that they might get from you. The precise conditions are found inthe GNU General Public License that comes with Emacs and also appearsfollowing this section.The easiest way to get a copy of GNU Emacs is from someone else who has it.You need not ask for permission to do so, or tell any one else; just copyit.If you have access to the Internet, you can get the latest distributionversion of GNU Emacs from host @file{prep.ai.mit.edu} using anonymouslogin. See the file @file{/u2/emacs/GETTING.GNU.SOFTWARE} on that hostto find out about your options for copying and which files to use.You may also receive GNU Emacs when you buy a computer. Computermanufacturers are free to distribute copies on the same terms that apply toeveryone else. These terms require them to give you the full sources,including whatever changes they may have made, and to permit you toredistribute the GNU Emacs received from them under the usual terms of theGeneral Public License. In other words, the program must be free for youwhen you get it, not just free for the manufacturer.If you cannot get a copy in any of those ways, you can order one from theFree Software Foundation. Though Emacs itself is free, our distributionservice is not. An order form is included at the end of manuals printed bythe Foundation. It is also included in the file @file{etc/DISTRIB} in theEmacs distribution. For further information, write to@displayFree Software Foundation675 Mass AveCambridge, MA 02139USA@end displayThe income from distribution fees goes to support the foundation'spurpose: the development of more free software to distribute just likeGNU Emacs.If you find GNU Emacs useful, please @b{send a donation} to the FreeSoftware Foundation. This will help support development of the rest of theGNU system, and other useful software beyond that. Your donation is taxdeductible.@node License, Intro, Distrib, Top@unnumbered GNU GENERAL PUBLIC LICENSE@center Version 1, February 1989@cindex license to copy Emacs@cindex General Public License@displayCopyright @copyright{} 1989 Free Software Foundation, Inc.675 Mass Ave, Cambridge, MA 02139, USAEveryone is permitted to copy and distribute verbatim copiesof this license document, but changing it is not allowed.@end display@unnumberedsec Preamble The license agreements of most software companies try to keep usersat the mercy of those companies. By contrast, our General PublicLicense is intended to guarantee your freedom to share and change freesoftware---to make sure the software is free for all its users. TheGeneral Public License applies to the Free Software Foundation'ssoftware and to any other program whose authors commit to using it.You can use it for your programs, too. When we speak of free software, we are referring to freedom, notprice. Specifically, the General Public License is designed to makesure that you have the freedom to give away or sell copies of freesoftware, that you receive source code or can get it if you want it,that you can change the software or use pieces of it in new freeprograms; and that you know you can do these things. To protect your rights, we need to make restrictions that forbidanyone to deny you these rights or to ask you to surrender the rights.These restrictions translate to certain responsibilities for you if youdistribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whethergratis or for a fee, you must give the recipients all the rights thatyou have. You must make sure that they, too, receive or can get thesource code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and(2) offer you this license which gives you legal permission to copy,distribute and/or modify the software. Also, for each author's protection and ours, we want to make certainthat everyone understands that there is no warranty for this freesoftware. If the software is modified by someone else and passed on, wewant its recipients to know that what they have is not the original, sothat any problems introduced by others will not reflect on the originalauthors' reputations. The precise terms and conditions for copying, distribution andmodification follow.@iftex@unnumberedsec TERMS AND CONDITIONS@end iftex@ifinfo@center TERMS AND CONDITIONS@end ifinfo@enumerate@itemThis License Agreement applies to any program or other work whichcontains a notice placed by the copyright holder saying it may bedistributed under the terms of this General Public License. The``Program'', below, refers to any such program or work, and a ``work basedon the Program'' means either the Program or any work containing theProgram or a portion of it, either verbatim or with modifications. Eachlicensee is addressed as ``you''.@item@cindex DistributionYou may copy and distribute verbatim copies of the Program's sourcecode as you receive it, in any medium, provided that you conspicuously andappropriately publish on each copy an appropriate copyright notice anddisclaimer of warranty; keep intact all the notices that refer to thisGeneral Public License and to the absence of any warranty; and give anyother recipients of the Program a copy of this General Public Licensealong with the Program. You may charge a fee for the physical act oftransferring a copy.@itemYou may modify your copy or copies of the Program or any portion ofit, and copy and distribute such modifications under the terms of Paragraph1 above, provided that you also do the following:@itemize @bullet@itemcause the modified files to carry prominent notices stating thatyou changed the files and the date of any change; and
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -