ebook img

Emacs in this manual PDF

344 Pages·1999·2.08 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Emacs in this manual

XEmacs User’s Manual July 1994 (General Public License upgraded, January 1991) Richard Stallman Lucid, Inc. and Ben Wing Copyright (cid:13)c 1985, 1986, 1988 Richard M. Stallman. Copyright (cid:13)c 1991, 1992, 1993, 1994 Lucid, Inc. Copyright (cid:13)c 1993, 1994 Sun Microsystems, Inc. Copyright (cid:13)c 1995 Amdahl Corporation. Permission is granted to make and distribute verbatim copies of this manual provided the copy- right notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the con- ditions for verbatim copying, provided also that the sections entitled “The GNU Manifesto”, “Distribution” and “GNU General Public License” are included exactly as in the original, and provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that the sections entitled “The GNU Manifesto”, “Distribution”and“GNU GeneralPublicLicense” may be includedin atranslation approved by the author instead of in the original English. i Short Contents Preface ............................................ 1 GNU GENERAL PUBLIC LICENSE ....................... 3 Distribution......................................... 9 Introduction........................................ 11 1 The XEmacs Frame ............................... 13 2 Keystrokes, Key Sequences, and Key Bindings ............. 17 3 Entering and Exiting Emacs.......................... 29 4 Basic Editing Commands............................ 37 5 Undoing Changes ................................. 43 6 The Minibuffer................................... 45 7 Running Commands by Name ........................ 51 8 Help.......................................... 53 9 Selecting Text ................................... 57 10 Killing and Moving Text ............................ 63 11 Registers....................................... 73 12 Controlling the Display ............................. 75 13 Searching and Replacement .......................... 79 14 Commands for Fixing Typos ......................... 89 15 File Handling.................................... 91 16 Using Multiple Buffers............................. 111 17 Multiple Windows................................ 115 18 World Scripts Support............................. 119 19 Major Modes ................................... 127 20 Indentation .................................... 129 21 Commands for Human Languages ..................... 133 22 Editing Programs ................................ 145 23 Compiling and Testing Programs...................... 167 24 Abbrevs....................................... 179 25 Editing Pictures ................................. 183 26 Sending Mail ................................... 187 27 Reading Mail ................................... 191 28 Miscellaneous Commands........................... 217 29 Customization .................................. 227 30 Correcting Mistakes (Yours or Emacs’s) ................. 257 XEmacs Features.................................... 263 Glossary.......................................... 267 ii XEmacs User’s Manual The GNU Manifesto.................................. 279 Key (Character) Index ................................ 287 Command and Function Index........................... 293 Variable Index...................................... 311 Concept Index...................................... 321 iii Table of Contents Preface.......................................... 1 GNU GENERAL PUBLIC LICENSE ............. 3 Preamble........................................................ 3 TERMS AND CONDITIONS..................................... 3 Appendix: How to Apply These Terms to Your New Programs....... 6 Distribution ..................................... 9 Getting Other Versions of Emacs.................................. 9 Introduction.................................... 11 1 The XEmacs Frame.......................... 13 1.1 Point...................................................... 13 1.2 The Echo Area............................................. 14 1.3 The Mode Line............................................. 14 1.4 Using XEmacs Under the X Window System................. 16 2 Keystrokes, Key Sequences, and Key Bindings ........................................... 17 2.1 Keystrokes as Building Blocks of Key Sequences.............. 17 2.1.1 Representing Keystrokes ........................... 18 2.1.2 Representing Key Sequences........................ 18 2.1.3 String Key Sequences.............................. 19 2.1.4 Assignment of the (cid:104)META(cid:105) Key ...................... 19 2.1.5 Assignment of the (cid:104)SUPER(cid:105) and (cid:104)HYPER(cid:105) Keys......... 20 2.2 Representation of Characters................................ 21 2.3 Keys and Commands....................................... 22 2.4 XEmacs Pull-down Menus .................................. 22 2.4.1 The File Menu..................................... 23 2.4.2 The Edit Menu.................................... 24 2.4.3 The Apps Menu................................... 25 2.4.4 The Options Menu................................. 25 2.4.5 The Buffers Menu.................................. 27 2.4.6 The Tools Menu................................... 27 2.4.7 The Help Menu.................................... 27 2.4.8 Customizing XEmacs Menus........................ 27 3 Entering and Exiting Emacs.................. 29 3.1 Exiting Emacs ............................................. 29 3.2 Command Line Switches and Arguments..................... 30 3.2.1 Command Line Arguments for Any Position......... 30 3.2.2 Command Line Arguments (Beginning of Line Only).. 31 3.2.3 Command Line Arguments (for XEmacs Under X)... 32 3.3 How XEmacs finds Directories and Files...................... 33 3.3.1 XEmacs Directory Hierarchies...................... 33 3.3.2 Package Hierarchies................................ 34 3.3.3 Directories and Paths.............................. 34 iv XEmacs User’s Manual 4 Basic Editing Commands .................... 37 4.1 Inserting Text.............................................. 37 4.2 Changing the Location of Point.............................. 37 4.3 Erasing Text............................................... 39 4.4 Files ...................................................... 39 4.5 Help....................................................... 40 4.6 Blank Lines................................................ 40 4.7 Continuation Lines......................................... 40 4.8 Cursor Position Information................................. 41 4.9 Numeric Arguments........................................ 42 5 Undoing Changes............................ 43 6 The Minibuffer.............................. 45 6.1 Minibuffers for File Names.................................. 45 6.2 Editing in the Minibuffer.................................... 46 6.3 Completion................................................ 46 6.3.1 A Completion Example ............................ 47 6.3.2 Completion Commands............................. 47 6.4 Repeating Minibuffer Commands............................ 48 7 Running Commands by Name................ 51 8 Help........................................ 53 8.1 Documentation for a Key................................... 54 8.2 Help by Command or Variable Name ........................ 54 8.3 Apropos................................................... 54 8.4 Other Help Commands ..................................... 55 9 Selecting Text............................... 57 9.1 The Mark and the Region................................... 57 9.1.1 Setting the Mark .................................. 57 9.1.2 Operating on the Region........................... 58 9.1.3 Commands to Mark Textual Objects................ 58 9.1.4 The Mark Ring.................................... 59 9.2 Selecting Text with the Mouse............................... 59 9.3 Additional Mouse Operations ............................... 60 10 Killing and Moving Text.................... 63 10.1 Deletion and Killing....................................... 63 10.1.1 Deletion ......................................... 63 10.1.2 Killing by Lines .................................. 64 10.1.3 Other Kill Commands............................. 64 10.2 Yanking.................................................. 65 10.2.1 The Kill Ring .................................... 65 10.2.2 Appending Kills.................................. 65 10.2.3 Yanking Earlier Kills.............................. 66 10.3 Using X Selections ........................................ 66 10.3.1 The Clipboard Selection........................... 67 10.3.2 Miscellaneous X Selection Commands.............. 67 10.3.3 X Cut Buffers.................................... 68 10.3.4 Active Regions ................................... 68 10.4 Accumulating Text........................................ 69 10.5 Rectangles................................................ 70 v 11 Registers................................... 73 11.1 Saving Positions in Registers............................... 73 11.2 Saving Text in Registers................................... 73 11.3 Saving Rectangles in Registers ............................. 74 12 Controlling the Display ..................... 75 12.1 Scrolling.................................................. 75 12.2 Horizontal Scrolling ....................................... 76 12.3 Selective Display.......................................... 76 12.4 Variables Controlling Display............................... 77 13 Searching and Replacement ................. 79 13.1 Incremental Search........................................ 79 13.1.1 Slow Terminal Incremental Search.................. 81 13.2 Non-Incremental Search.................................... 81 13.3 Word Search.............................................. 82 13.4 Regular Expression Search................................. 82 13.5 Syntax of Regular Expressions.............................. 82 13.6 Searching and Case........................................ 85 13.7 Replacement Commands................................... 85 13.7.1 Unconditional Replacement........................ 86 13.7.2 Regexp Replacement.............................. 86 13.7.3 Replace Commands and Case...................... 86 13.7.4 Query Replace.................................... 87 13.8 Other Search-and-Loop Commands......................... 88 14 Commands for Fixing Typos ................ 89 14.1 Killing Your Mistakes...................................... 89 14.2 Transposing Text.......................................... 89 14.3 Case Conversion........................................... 90 14.4 Checking and Correcting Spelling........................... 90 15 File Handling .............................. 91 15.1 File Names ............................................... 91 15.2 Visiting Files.............................................. 92 15.3 Saving Files............................................... 94 15.3.1 Backup Files..................................... 95 15.3.1.1 Single or Numbered Backups.............. 95 15.3.1.2 Automatic Deletion of Backups............ 96 15.3.1.3 Copying vs.Renaming .................... 96 15.3.2 Protection Against Simultaneous Editing........... 96 15.4 Reverting a Buffer......................................... 97 15.5 Auto-Saving: Protection Against Disasters.................. 98 15.5.1 Auto-Save Files................................... 98 15.5.2 Controlling Auto-Saving........................... 99 15.5.3 Recovering Data from Auto-Saves.................. 99 15.6 Version Control........................................... 99 15.6.1 Concepts of Version Control...................... 100 15.6.2 Editing with Version Control..................... 100 15.6.3 Variables Affecting Check-in and Check-out........ 101 15.6.4 Log Entries ..................................... 102 15.6.5 Change Logs and VC ............................ 102 15.6.6 Examining And Comparing Old Versions.......... 103 15.6.7 VC Status Commands ........................... 104 vi XEmacs User’s Manual 15.6.8 Renaming VC Work Files and Master Files........ 104 15.6.9 Snapshots....................................... 105 15.6.9.1 Making and Using Snapshots............. 105 15.6.9.2 Snapshot Caveats....................... 105 15.6.10 Inserting Version Control Headers................ 106 15.7 Listing a File Directory................................... 107 15.8 Comparing Files ......................................... 107 15.9 Dired, the Directory Editor............................... 108 15.9.1 Entering Dired.................................. 108 15.9.2 Editing in Dired................................. 108 15.9.3 Deleting Files With Dired........................ 108 15.9.4 Immediate File Operations in Dired............... 109 15.10 Miscellaneous File Operations............................ 110 16 Using Multiple Buffers..................... 111 16.1 Creating and Selecting Buffers ............................ 111 16.2 Listing Existing Buffers................................... 112 16.3 Miscellaneous Buffer Operations........................... 112 16.4 Killing Buffers........................................... 113 16.5 Operating on Several Buffers.............................. 113 17 Multiple Windows......................... 115 17.1 Concepts of Emacs Windows.............................. 115 17.2 Splitting Windows........................................ 115 17.3 Using Other Windows.................................... 116 17.4 Displaying in Another Window............................ 117 17.5 Deleting and Rearranging Windows........................ 117 18 World Scripts Support..................... 119 18.1 Introduction to world scripts.............................. 119 18.2 Language Environments .................................. 119 18.3 Input Methods........................................... 120 18.4 Selecting an Input Method................................ 121 18.5 Coding Systems.......................................... 121 18.6 Recognizing Coding Systems.............................. 122 18.7 Specifying a Coding System............................... 123 19 Major Modes ............................. 127 19.1 Choosing Major Modes................................... 127 20 Indentation ............................... 129 20.1 Indentation Commands and Techniques.................... 129 20.2 Tab Stops ............................................... 130 20.3 Tabs vs. Spaces.......................................... 130 vii 21 Commands for Human Languages .......... 133 21.1 Text Mode............................................... 133 21.1.1 Nroff Mode...................................... 133 21.1.2 TEX Mode ...................................... 134 21.1.2.1 TEX Editing Commands................. 134 21.1.2.2 TEX Printing Commands................ 135 21.1.3 Outline Mode ................................... 136 21.1.3.1 Format of Outlines...................... 137 21.1.3.2 Outline Motion Commands.............. 137 21.1.3.3 Outline Visibility Commands ............ 138 21.2 Words................................................... 139 21.3 Sentences................................................ 140 21.4 Paragraphs.............................................. 140 21.5 Pages ................................................... 141 21.6 Filling Text.............................................. 142 21.6.1 Auto Fill Mode.................................. 142 21.6.2 Explicit Fill Commands.......................... 143 21.6.3 The Fill Prefix .................................. 143 21.7 Case Conversion Commands .............................. 144 22 Editing Programs ......................... 145 22.1 Major Modes for Programming Languages ................. 145 22.2 Lists and Sexps.......................................... 146 22.3 Defuns .................................................. 147 22.4 Indentation for Programs................................. 148 22.4.1 Basic Program Indentation Commands............ 148 22.4.2 Indenting Several Lines .......................... 149 22.4.3 Customizing Lisp Indentation..................... 149 22.4.4 Customizing C Indentation....................... 150 22.5 Automatic Display of Matching Parentheses................ 152 22.6 Manipulating Comments.................................. 152 22.6.1 Multiple Lines of Comments...................... 153 22.6.2 Options Controlling Comments................... 153 22.7 Editing Without Unbalanced Parentheses.................. 154 22.8 Completion for Lisp Symbols.............................. 154 22.9 Documentation Commands ............................... 155 22.10 Change Logs............................................ 155 22.11 Tags Tables............................................. 156 22.11.1 Source File Tag Syntax ......................... 156 22.11.2 Creating Tags Tables ........................... 157 22.11.3 Selecting a Tags Table.......................... 159 22.11.4 Finding a Tag.................................. 160 22.11.5 Searching and Replacing with Tags Tables........ 161 22.11.6 Tags Table Inquiries............................ 162 22.12 Fortran Mode........................................... 162 22.12.1 Motion Commands ............................. 162 22.12.2 Fortran Indentation............................. 163 22.12.2.1 Fortran Indentation Commands......... 163 22.12.2.2 Line Numbers and Continuation......... 163 22.12.2.3 Syntactic Conventions.................. 164 22.12.2.4 Variables for Fortran Indentation........ 164 22.12.3 Comments..................................... 164 22.12.4 Columns....................................... 165 22.12.5 Fortran Keyword Abbrevs....................... 166 22.13 Asm Mode.............................................. 166 viii XEmacs User’s Manual 23 Compiling and Testing Programs........... 167 23.1 Running “make”, or Compilers Generally .................. 167 23.2 Major Modes for Lisp..................................... 168 23.3 Libraries of Lisp Code for Emacs.......................... 169 23.3.1 Loading Libraries................................ 169 23.3.2 Compiling Libraries.............................. 170 23.3.3 Converting Mocklisp to Lisp...................... 171 23.4 Evaluating Emacs-Lisp Expressions........................ 171 23.5 The Emacs-Lisp Debugger................................ 172 23.6 Lisp Interaction Buffers................................... 173 23.7 Running an External Lisp................................. 174 23.8 Packages................................................. 174 23.8.1 Package Flavors................................. 174 23.8.2 Package Distributions............................ 175 23.8.3 Binary Packages................................. 175 23.8.4 Source Packages................................. 175 23.8.5 Getting Started.................................. 175 23.8.6 Choosing the Packages You Need ................. 175 23.8.7 XEmacs and Installing Packages.................. 176 23.8.8 Other package installation interfaces .............. 177 23.8.9 Manual Binary Package Installation............... 177 23.8.10 Prerequisites for Building Source Packages........ 178 23.8.11 What You Can Do With Source Packages ........ 178 24 Abbrevs .................................. 179 24.1 Defining Abbrevs......................................... 179 24.2 Controlling Abbrev Expansion ............................ 180 24.3 Examining and Editing Abbrevs........................... 181 24.4 Saving Abbrevs.......................................... 181 24.5 Dynamic Abbrev Expansion............................... 182 25 Editing Pictures........................... 183 25.1 Basic Editing in Picture Mode ............................ 183 25.2 Controlling Motion After Insert ........................... 184 25.3 Picture Mode Tabs....................................... 184 25.4 Picture Mode Rectangle Commands....................... 185 26 Sending Mail.............................. 187 26.1 The Format of the Mail Buffer ............................ 187 26.2 Mail Header Fields....................................... 188 26.3 Mail Mode............................................... 189

Description:
Permission is granted to make and distribute verbatim copies of this manual provided the copy- right notice and .. 3.2.3 Command Line Arguments (for XEmacs Under X) 32. 3.3 How 24.3 Examining and Editing Abbrevs. ..
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.