📄 emacs.tex
字号:
@itemcause the whole of any work that you distribute or publish, thatin whole or in part contains the Program or any part thereof, eitherwith or without modifications, to be licensed at no charge to allthird parties under the terms of this General Public License (exceptthat you may choose to grant warranty protection to some or allthird parties, at your option).@itemIf the modified program normally reads commands interactively whenrun, you must cause it, when started running for such interactive usein the simplest and most usual way, to print or display anannouncement including an appropriate copyright notice and a noticethat there is no warranty (or else, saying that you provide awarranty) and that users may redistribute the program under theseconditions, and telling the user how to view a copy of this GeneralPublic License.@itemYou may charge a fee for the physical act of transferring acopy, and you may at your option offer warranty protection inexchange for a fee.@end itemizeMere aggregation of another independent work with the Program (or itsderivative) on a volume of a storage or distribution medium does not bringthe other work under the scope of these terms.@itemYou may copy and distribute the Program (or a portion or derivative ofit, under Paragraph 2) in object code or executable form under the terms ofParagraphs 1 and 2 above provided that you also do one of the following:@itemize @bullet@itemaccompany it with the complete corresponding machine-readablesource code, which must be distributed under the terms ofParagraphs 1 and 2 above; or,@itemaccompany it with a written offer, valid for at least threeyears, to give any third party free (except for a nominal chargefor the cost of distribution) a complete machine-readable copy of thecorresponding source code, to be distributed under the terms ofParagraphs 1 and 2 above; or,@itemaccompany it with the information you received as to where thecorresponding source code may be obtained. (This alternative isallowed only for noncommercial distribution and only if youreceived the program in object code or executable form alone.)@end itemizeSource code for a work means the preferred form of the work for makingmodifications to it. For an executable file, complete source code meansall the source code for all modules it contains; but, as a specialexception, it need not include source code for modules which are standardlibraries that accompany the operating system on which the executablefile runs, or for standard header files or definitions files thataccompany that operating system.@itemYou may not copy, modify, sublicense, distribute or transfer theProgram except as expressly provided under this General Public License.Any attempt otherwise to copy, modify, sublicense, distribute or transferthe Program is void, and will automatically terminate your rights to usethe Program under this License. However, parties who have receivedcopies, or rights to use copies, from you under this General PublicLicense will not have their licenses terminated so long as such partiesremain in full compliance.@itemBy copying, distributing or modifying the Program (or any work basedon the Program) you indicate your acceptance of this license to do so,and all its terms and conditions.@itemEach time you redistribute the Program (or any work based on theProgram), the recipient automatically receives a license from the originallicensor to copy, distribute or modify the Program subject to theseterms and conditions. You may not impose any further restrictions on therecipients' exercise of the rights granted herein.@itemThe Free Software Foundation may publish revised and/or new versionsof the General Public License from time to time. Such new versions willbe similar in spirit to the present version, but may differ in detail toaddress new problems or concerns.Each version is given a distinguishing version number. If the Programspecifies a version number of the license which applies to it and ``anylater version'', you have the option of following the terms and conditionseither of that version or of any later version published by the FreeSoftware Foundation. If the Program does not specify a version number ofthe license, you may choose any version ever published by the Free SoftwareFoundation.@itemIf you wish to incorporate parts of the Program into other freeprograms whose distribution conditions are different, write to the authorto ask for permission. For software which is copyrighted by the FreeSoftware Foundation, write to the Free Software Foundation; we sometimesmake exceptions for this. Our decision will be guided by the two goalsof preserving the free status of all derivatives of our free software andof promoting the sharing and reuse of software generally.@iftex@heading NO WARRANTY@end iftex@ifinfo@center NO WARRANTY@end ifinfo@itemBECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTYFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHENOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIESPROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSEDOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OFMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK ASTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THEPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,REPAIR OR CORRECTION.@itemIN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILLANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/ORREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGESARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOTLIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSESSUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATEWITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEENADVISED OF THE POSSIBILITY OF SUCH DAMAGES.@end enumerate@iftex@heading END OF TERMS AND CONDITIONS@end iftex@ifinfo@center END OF TERMS AND CONDITIONS@end ifinfo@page@unnumberedsec Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatestpossible use to humanity, the best way to achieve this is to make itfree software which everyone can redistribute and change under theseterms. To do so, attach the following notices to the program. It is safest toattach them to the start of each source file to most effectively conveythe exclusion of warranty; and each file should have at least the``copyright'' line and a pointer to where the full notice is found.@smallexample@var{one line to give the program's name and a brief idea of what it does.}Copyright (C) 19@var{yy} @var{name of author}This program is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 1, or (at your option)any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.@end smallexampleAlso add information on how to contact you by electronic and paper mail.If the program is interactive, make it output a short notice like thiswhen it starts in an interactive mode:@smallexampleGnomovision version 69, Copyright (C) 19@var{yy} @var{name of author}Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.This is free software, and you are welcome to redistribute itunder certain conditions; type `show c' for details.@end smallexampleThe hypothetical commands `show w' and `show c' should show theappropriate parts of the General Public License. Of course, thecommands you use may be called something other than `show w' and `showc'; they could even be mouse-clicks or menu items---whatever suits yourprogram.You should also get your employer (if you work as a programmer) or yourschool, if any, to sign a ``copyright disclaimer'' for the program, ifnecessary. Here a sample; alter the names:@exampleYoyodyne, Inc., hereby disclaims all copyright interest in theprogram `Gnomovision' (a program to direct compilers to make passesat assemblers) written by James Hacker.@var{signature of Ty Coon}, 1 April 1989Ty Coon, President of Vice@end exampleThat's all there is to it!@node Intro, Glossary, License, Top@unnumbered Introduction You are reading about GNU Emacs, the GNU incarnation of the advanced,self-documenting, customizable, extensible real-time display editor Emacs.(The `G' in `GNU' is not silent.) We say that Emacs is a @dfn{display} editor because normally the textbeing edited is visible on the screen and is updated automatically as youtype your commands. @xref{Screen,Display}. We call it a @dfn{real-time} editor because the display is updated veryfrequently, usually after each character or pair of characters youtype. This minimizes the amount of information you must keep in yourhead as you edit. @xref{Basic,Real-time,Basic Editing}. We call Emacs advanced because it provides facilities that go beyondsimple insertion and deletion: filling of text; automatic indentation ofprograms; viewing two or more files at once; and dealing in terms ofcharacters, words, lines, sentences, paragraphs, and pages, as well asexpressions and comments in several different programming languages. It ismuch easier to type one command meaning ``go to the end of the paragraph''than to find that spot with simple cursor keys. @dfn{Self-documenting} means that at any time you can type a specialcharacter, @kbd{Control-h}, to find out what your options are. You canalso use it to find out what any command does, or to find all the commandsthat pertain to a topic. @xref{Help}. @dfn{Customizable} means that you can change the definitions of Emacscommands in little ways. For example, if you use a programming language inwhich comments start with @samp{<**} and end with @samp{**>}, you can tellthe Emacs comment manipulation commands to use those strings(@pxref{Comments}). Another sort of customization is rearrangement of thecommand set. For example, if you prefer the four basic cursor motioncommands (up, down, left and right) on keys in a diamond pattern on thekeyboard, you can have it. @xref{Customization}. @dfn{Extensible} means that you can go beyond simple customization andwrite entirely new commands, programs in the Lisp language to be run byEmacs's own Lisp interpreter. Emacs is an ``on-line extensible'' system,which means that it is divided into many functions that call each other,any of which can be redefined in the middle of an editing session. Anypart of Emacs can be replaced without making a separate copy of all ofEmacs. Most of the editing commands of Emacs are written in Lisp already;the few exceptions could have been written in Lisp but are written in C forefficiency. Although only a programmer can write an extension, anybody canuse it afterward.@node Screen, Characters, Concept Index, Top@chapter The Organization of the Screen@cindex screen Emacs divides the screen into several areas, each of which containsits own sorts of information. The biggest area, of course, is the onein which you usually see the text you are editing. When you are using Emacs, the screen is divided into a number of@dfn{windows}. Initially there is one text window occupying all but thelast line, plus the special @dfn{echo area} or @dfn{minibuffer window} inthe last line. The text window can be subdivided horizontally orvertically into multiple text windows, each of which can be used for adifferent file (@pxref{Windows}). The window that the cursor is in is the@dfn{selected window}, in which editing takes place. The other windows arejust for reference unless you select one of them. Each text window's last line is a @dfn{mode line} which describes what isgoing on in that window. It is in inverse video if the terminal supportsthat, and contains text that starts like @samp{-----Emacs:@: @var{something}}. Itspurpose is to indicate what buffer is being displayed above it in thewindow; what major and minor modes are in use; and whether the buffer'stext has been changed.@menu* Point:: The place in the text where editing commands operate.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -