]> code.delx.au - gnu-emacs/blobdiff - etc/tutorials/TUTORIAL
Update copyright year to 2016
[gnu-emacs] / etc / tutorials / TUTORIAL
index b74d1421ee6a3a50380faa2006031b93eb4cc1cd..ee328e87eb4c7e9115856499891e3a7028cdeb51 100644 (file)
@@ -312,7 +312,7 @@ of text is "continued" onto a second screen line.  If you're using a
 graphical display, little curved arrows appear in the narrow spaces on
 each side of the text area (the left and right "fringes"), to indicate
 where a line has been continued.  If you're using a text terminal, the
-continued line is indicated by a backslash ("\") on the rightmost
+continued line is indicated by a backslash ('\') on the rightmost
 screen column.
 
 >> Insert text until you reach the right margin, and keep on inserting.
@@ -331,6 +331,19 @@ screen width, it will be displayed with a continuation line.
 
 >> Type <Return> to reinsert the Newline you deleted.
 
+The <Return> key is special, in that pressing it may do more than
+just insert a Newline character.  Depending on the surrounding text,
+it may insert whitespace after the Newline character, so that when
+you start typing on the newly created line, the text lines up with
+that on the previous line.  We call this behavior (where pressing a
+key does more than simply inserting the relevant character) "electric".
+
+>> Here is an example of <Return> being electric.
+   Type <Return> at the end of this line.
+
+You should see that after inserting the Newline, Emacs inserts spaces
+so that the cursor moves under the "T" of "Type".
+
 Remember that most Emacs commands can be given a repeat count;
 this includes text characters.  Repeating a text character inserts
 it several times.
@@ -372,13 +385,15 @@ the text between the two positions.
 
 The difference between "killing" and "deleting" is that "killed" text
 can be reinserted (at any position), whereas "deleted" things cannot
-be reinserted in this way (you can, however, undo a deletion--see below).
-Reinsertion of killed text is called "yanking".  Generally, the
-commands that can remove a lot of text kill the text (they are set up so
-that you can yank the text), while the commands that remove just one
-character, or only remove blank lines and spaces, do deletion (so you
-cannot yank that text).  <DEL> and C-d do deletion in the simplest
-case, with no argument.  When given an argument, they kill instead.
+be reinserted in this way (you can, however, undo a deletion--see
+below).  Reinsertion of killed text is called "yanking".  (Think of it
+as yanking back, or pulling back, some text that was taken away.)
+Generally, the commands that can remove a lot of text kill the text
+(they are set up so that you can yank the text), while the commands
+that remove just one character, or only remove blank lines and spaces,
+do deletion (so you cannot yank that text).  <DEL> and C-d do deletion
+in the simplest case, with no argument.  When given an argument, they
+kill instead.
 
 >> Move the cursor to the beginning of a line which is not empty.
    Then type C-k to kill the text on that line.
@@ -389,15 +404,14 @@ Note that a single C-k kills the contents of the line, and a second
 C-k kills the line itself, and makes all the other lines move up.  C-k
 treats a numeric argument specially: it kills that many lines AND
 their contents.  This is not mere repetition.  C-u 2 C-k kills two
-lines and their newlines; typing C-k twice would not do that.
+lines and their Newlines; typing C-k twice would not do that.
 
-Reinserting killed text is called "yanking".  (Think of it as yanking
-back, or pulling back, some text that was taken away.)  You can yank
-the killed text either at the same place where it was killed, or at
-some other place in the text you are editing, or even in a different
-file.  You can yank the same text several times; that makes multiple
-copies of it.  Some other editors call killing and yanking "cutting"
-and "pasting" (see the Glossary in the Emacs manual).
+You can yank the killed text either at the same place where it was
+killed, or at some other place in the text you are editing, or even in
+a different file.  You can yank the same text several times; that
+makes multiple copies of it.  Some other editors call killing and
+yanking "cutting" and "pasting" (see the Glossary in the Emacs
+manual).
 
 The command for yanking is C-y.  It reinserts the last killed text,
 at the current cursor position.
@@ -632,7 +646,7 @@ C-z is the command to exit Emacs *temporarily*--so that you can go
 back to the same Emacs session afterward.  When Emacs is running on a
 text terminal, C-z "suspends" Emacs; that is, it returns to the shell
 but does not destroy the Emacs job.  In the most common shells, you
-can resume Emacs with the `fg' command or with `%emacs'.
+can resume Emacs with the "fg" command or with "%emacs".
 
 The time to use C-x C-c is when you are about to log out.  It's also
 the right thing to use to exit an Emacs invoked for a quick edit, such
@@ -821,7 +835,7 @@ called an incremental search waiting for you to type the thing that
 you want to search for.  <Return> terminates a search.
 
 >> Now type C-s to start a search.  SLOWLY, one letter at a time,
-   type the word 'cursor', pausing after you type each
+   type the word "cursor", pausing after you type each
    character to notice what happens to the cursor.
    Now you have searched for "cursor", once.
 >> Type C-s again, to search for the next occurrence of "cursor".
@@ -830,7 +844,7 @@ you want to search for.  <Return> terminates a search.
 
 Did you see what happened?  Emacs, in an incremental search, tries to
 go to the occurrence of the string that you've typed out so far.  To
-go to the next occurrence of 'cursor' just type C-s again.  If no such
+go to the next occurrence of "cursor" just type C-s again.  If no such
 occurrence exists, Emacs beeps and tells you the search is currently
 "failing".  C-g would also terminate the search.
 
@@ -1046,7 +1060,7 @@ corresponding command names (such as C-x C-f beside find-file).
 >> Type C-x 1 to delete the help window.
 
    C-h i       Read included Manuals (a.k.a. Info).  This command puts
-               you into a special buffer called `*info*' where you
+               you into a special buffer called "*info*" where you
                can read manuals for the packages installed on your system.
                Type m emacs <Return> to read the Emacs manual.
                If you have never before used Info, type ? and Emacs
@@ -1096,7 +1110,8 @@ starting with the one written by Stuart Cracraft for the original Emacs.
 This version of the tutorial is a part of GNU Emacs.  It is copyrighted
 and comes with permission to distribute copies on certain conditions:
 
-  Copyright (C) 1985, 1996, 1998, 2001-2012 Free Software Foundation, Inc.
+  Copyright (C) 1985, 1996, 1998, 2001-2016 Free Software Foundation,
+  Inc.
 
   This file is part of GNU Emacs.
 
@@ -1116,4 +1131,3 @@ and comes with permission to distribute copies on certain conditions:
 Please read the file COPYING and then do give copies of GNU Emacs to
 your friends.  Help stamp out software obstructionism ("ownership") by
 using, writing, and sharing free software!
-