diff options
| author | Chong Yidong | 2010-11-27 15:04:57 -0500 |
|---|---|---|
| committer | Chong Yidong | 2010-11-27 15:04:57 -0500 |
| commit | 07976ae3b816dea4fd541bbba862603d3132eb2c (patch) | |
| tree | 4a437b7cb3abb01fb144530a130c991882a1b7f2 /doc | |
| parent | 9610796712a3bc43730c99005906571a2c0bccbd (diff) | |
| parent | 402c8a49571227f8a4e678d4a6cdd6ba7841aef9 (diff) | |
| download | emacs-07976ae3b816dea4fd541bbba862603d3132eb2c.tar.gz emacs-07976ae3b816dea4fd541bbba862603d3132eb2c.zip | |
Merge changes from emacs-23 branch
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/ChangeLog | 25 | ||||
| -rw-r--r-- | doc/emacs/emacs.texi | 5 | ||||
| -rw-r--r-- | doc/emacs/macos.texi | 89 | ||||
| -rw-r--r-- | doc/emacs/maintaining.texi | 374 | ||||
| -rw-r--r-- | doc/emacs/vc1-xtra.texi | 6 | ||||
| -rw-r--r-- | doc/lispref/ChangeLog | 30 | ||||
| -rw-r--r-- | doc/lispref/functions.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/help.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/nonascii.texi | 7 | ||||
| -rw-r--r-- | doc/lispref/numbers.texi | 8 | ||||
| -rw-r--r-- | doc/lispref/objects.texi | 1 | ||||
| -rw-r--r-- | doc/lispref/strings.texi | 63 | ||||
| -rw-r--r-- | doc/lispref/symbols.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/text.texi | 31 | ||||
| -rw-r--r-- | doc/lispref/variables.texi | 18 | ||||
| -rw-r--r-- | doc/misc/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/misc/nxml-mode.texi | 59 |
17 files changed, 413 insertions, 314 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index cb243825d5d..e390c6cbc16 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,28 @@ | |||
| 1 | 2010-11-27 Bob Rogers <rogers-emacs@rgrjr.dyndns.org> | ||
| 2 | |||
| 3 | * maintaining.texi (VC With A Locking VCS, VC Directory Commands): | ||
| 4 | * vc1-xtra.texi (Customizing VC, General VC Options): Small fixes. | ||
| 5 | |||
| 6 | 2010-11-27 Chong Yidong <cyd@stupidchicken.com> | ||
| 7 | |||
| 8 | * maintaining.texi (Version Control Systems): Fix repeated sentence. | ||
| 9 | Suggested by Štěpán Němec. | ||
| 10 | |||
| 11 | 2010-11-27 Chong Yidong <cyd@stupidchicken.com> | ||
| 12 | |||
| 13 | * maintaining.texi (Version Control): Say "commit", not "check in". | ||
| 14 | (Version Control Systems): Simplify descriptions. | ||
| 15 | (VCS Merging, VCS Changesets, VCS Repositories): New nodes, split from | ||
| 16 | VCS Concepts. | ||
| 17 | (VC Mode Line): Update example. | ||
| 18 | (Old Revisions): Document revert-buffer for vc-diff. | ||
| 19 | (Log Buffer): Promote to a subsection. Document header lines. | ||
| 20 | |||
| 21 | * macos.texi (Mac / GNUstep Basics): Document | ||
| 22 | ns-right-alternate-modifier. | ||
| 23 | |||
| 24 | * emacs.texi (Top): Update node listing. | ||
| 25 | |||
| 1 | 2010-11-13 Eli Zaretskii <eliz@gnu.org> | 26 | 2010-11-13 Eli Zaretskii <eliz@gnu.org> |
| 2 | 27 | ||
| 3 | * rmail.texi (Rmail Coding): Characters with no fonts are not | 28 | * rmail.texi (Rmail Coding): Characters with no fonts are not |
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 1ece1ea6dd8..65a565dbe8e 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi | |||
| @@ -771,6 +771,7 @@ Version Control | |||
| 771 | * Introduction to VC:: How version control works in general. | 771 | * Introduction to VC:: How version control works in general. |
| 772 | * VC Mode Line:: How the mode line shows version control status. | 772 | * VC Mode Line:: How the mode line shows version control status. |
| 773 | * Basic VC Editing:: How to edit a file under version control. | 773 | * Basic VC Editing:: How to edit a file under version control. |
| 774 | * Log Buffer:: Features available in log entry buffers. | ||
| 774 | * Old Revisions:: Examining and comparing old versions. | 775 | * Old Revisions:: Examining and comparing old versions. |
| 775 | * Secondary VC Commands:: The commands used a little less frequently. | 776 | * Secondary VC Commands:: The commands used a little less frequently. |
| 776 | * VC Directory Mode:: Listing files managed by version control. | 777 | * VC Directory Mode:: Listing files managed by version control. |
| @@ -785,6 +786,9 @@ Introduction to Version Control | |||
| 785 | * Why Version Control?:: Understanding the problems it addresses. | 786 | * Why Version Control?:: Understanding the problems it addresses. |
| 786 | * Version Control Systems:: Supported version control back-end systems. | 787 | * Version Control Systems:: Supported version control back-end systems. |
| 787 | * VCS Concepts:: Words and concepts related to version control. | 788 | * VCS Concepts:: Words and concepts related to version control. |
| 789 | * VCS Merging:: How file conflicts are handled. | ||
| 790 | * VCS Changesets:: Changesets in version control. | ||
| 791 | * VCS Repositories:: Where version control repositories are stored. | ||
| 788 | * Types of Log File:: The VCS log in contrast to the ChangeLog. | 792 | * Types of Log File:: The VCS log in contrast to the ChangeLog. |
| 789 | 793 | ||
| 790 | Basic Editing under Version Control | 794 | Basic Editing under Version Control |
| @@ -792,7 +796,6 @@ Basic Editing under Version Control | |||
| 792 | * VC With A Merging VCS:: Without locking: default mode for CVS. | 796 | * VC With A Merging VCS:: Without locking: default mode for CVS. |
| 793 | * VC With A Locking VCS:: RCS in its default mode, SCCS, and optionally CVS. | 797 | * VC With A Locking VCS:: RCS in its default mode, SCCS, and optionally CVS. |
| 794 | * Advanced C-x v v:: Advanced features available with a prefix argument. | 798 | * Advanced C-x v v:: Advanced features available with a prefix argument. |
| 795 | * Log Buffer:: Features available in log entry buffers. | ||
| 796 | 799 | ||
| 797 | The Secondary Commands of VC | 800 | The Secondary Commands of VC |
| 798 | 801 | ||
diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi index 6fa5666ba6f..044a722a07a 100644 --- a/doc/emacs/macos.texi +++ b/doc/emacs/macos.texi | |||
| @@ -8,23 +8,22 @@ | |||
| 8 | @cindex Macintosh | 8 | @cindex Macintosh |
| 9 | @cindex GNUstep | 9 | @cindex GNUstep |
| 10 | 10 | ||
| 11 | This section briefly describes the peculiarities of using Emacs built with | 11 | This section describes the peculiarities of using Emacs built with |
| 12 | the GNUstep libraries on GNU/Linux or other operating systems, or on Mac OS X | 12 | the GNUstep libraries on GNU/Linux or other operating systems, or on |
| 13 | with native window system support. For Mac OS X, Emacs can be built either | 13 | Mac OS X with native window system support. On Mac OS X, Emacs can be |
| 14 | without window system support, with X11, or with the Cocoa interface. This | 14 | built either without window system support, with X11, or with the |
| 15 | section only applies to the Cocoa build. Emacs 23 does not support Mac OS | 15 | Cocoa interface; this section only applies to the Cocoa build. Emacs |
| 16 | Classic. | 16 | does not support earlier versions of Mac OS. |
| 17 | 17 | ||
| 18 | Emacs, when built on Mac OS X, uses the Cocoa application interface. For | 18 | For various historical and technical reasons, Emacs uses the term |
| 19 | various historical and technical reasons, Emacs uses the term @samp{Nextstep} | 19 | @samp{Nextstep} internally, instead of ``Cocoa'' or ``Mac OS X''; for |
| 20 | internally, instead of ``Cocoa'' or ``Mac OS X''; for instance, most of the | 20 | instance, most of the commands and variables described in this section |
| 21 | commands and variables described in the following sections begin with | 21 | begin with @samp{ns-}, which is short for @samp{Nextstep}. NeXTstep |
| 22 | @samp{ns-}, which is short for @samp{Nextstep}. NeXTstep was an application | 22 | was an application interface released by NeXT Inc during the 1980s, of |
| 23 | interface released by NeXT Inc during the 1980s, of which Cocoa is a direct | 23 | which Cocoa is a direct descendant. Apart from Cocoa, there is |
| 24 | descendant. Apart from Cocoa, there is another NeXTstep-style system: | 24 | another NeXTstep-style system: GNUstep, which is free software. As of |
| 25 | GNUstep, which is free software. As of this writing, the GNUstep support is | 25 | this writing, the GNUstep support is alpha status (@pxref{GNUstep |
| 26 | alpha status (@pxref{GNUstep Support}), but we hope to improve it in the | 26 | Support}), but we hope to improve it in the future. |
| 27 | future. | ||
| 28 | 27 | ||
| 29 | @menu | 28 | @menu |
| 30 | * Mac / GNUstep Basics:: Basic Emacs usage under GNUstep or Mac OS. | 29 | * Mac / GNUstep Basics:: Basic Emacs usage under GNUstep or Mac OS. |
| @@ -37,19 +36,24 @@ future. | |||
| 37 | @section Basic Emacs usage under Mac OS and GNUstep | 36 | @section Basic Emacs usage under Mac OS and GNUstep |
| 38 | 37 | ||
| 39 | By default, the @key{alt} and @key{option} keys are the same as | 38 | By default, the @key{alt} and @key{option} keys are the same as |
| 40 | @key{Meta} when running under Mac OS. The Mac @key{Cmd} key is the | 39 | @key{Meta}. The Mac @key{Cmd} key is the same as @key{Super}, and |
| 41 | same as @key{Super}, and Emacs provides a set of keybindings using | 40 | Emacs provides a set of keybindings using this modifier key that mimic |
| 42 | this modifier key that mimic other Mac / GNUstep applications (@pxref{Mac / | 41 | other Mac / GNUstep applications (@pxref{Mac / GNUstep Events}). You |
| 43 | GNUstep Events}). You can change these bindings in the usual way (@pxref{Key | 42 | can change these bindings in the usual way (@pxref{Key Bindings}). |
| 44 | Bindings}). | 43 | |
| 45 | 44 | The variable @code{ns-right-alternate-modifier} controls the | |
| 46 | The standard Mac / GNUstep font and color panels are accessible via Lisp commands. | 45 | behavior of the right @key{alt} and @key{option} keys. These keys |
| 47 | To use the color panel, drag from it to an Emacs frame to change the | 46 | behave like the left-hand keys if the value is @code{left} (the |
| 48 | foreground color of the face at that position (if the @key{shift} key | 47 | default). A value of @code{control}, @code{meta}, @code{alt}, |
| 49 | is held down, it changes the background color instead). To discard the | 48 | @code{super}, or @code{hyper} makes them behave like the corresponding |
| 50 | settings, create a new frame and close the altered one. | 49 | modifier keys; a value of @code{none} tells Emacs to ignore them. |
| 51 | @c [unclear if the following holds.] | 50 | |
| 52 | @c To finalize the settings for either color or font, choose @samp{Save Options} in the @samp{Options} menu. | 51 | The standard Mac / GNUstep font and color panels are accessible via |
| 52 | Lisp commands. To use the color panel, drag from it to an Emacs frame | ||
| 53 | to change the foreground color of the face at that position (if the | ||
| 54 | @key{shift} key is held down, it changes the background color | ||
| 55 | instead). To discard the settings, create a new frame and close the | ||
| 56 | altered one. | ||
| 53 | 57 | ||
| 54 | @key{S-Mouse-1} (i.e., clicking the left mouse button | 58 | @key{S-Mouse-1} (i.e., clicking the left mouse button |
| 55 | while holding down the @key{Shift} key) adjusts the region to the | 59 | while holding down the @key{Shift} key) adjusts the region to the |
| @@ -58,7 +62,7 @@ it does not pop up a menu for changing the default face, as | |||
| 58 | @key{S-Mouse-1} normally does (@pxref{Temporary Face Changes}). This | 62 | @key{S-Mouse-1} normally does (@pxref{Temporary Face Changes}). This |
| 59 | change makes Emacs behave more like other Mac / GNUstep applications. | 63 | change makes Emacs behave more like other Mac / GNUstep applications. |
| 60 | 64 | ||
| 61 | When you open or save files using the menus, or using the | 65 | When you open or save files using the menus, or using the |
| 62 | @key{Cmd-o} and @key{Cmd-S} bindings, Emacs uses graphical file | 66 | @key{Cmd-o} and @key{Cmd-S} bindings, Emacs uses graphical file |
| 63 | dialogs to read file names. However, if you use the regular Emacs key | 67 | dialogs to read file names. However, if you use the regular Emacs key |
| 64 | sequences, such as @key{C-x C-f}, Emacs uses the minibuffer to read | 68 | sequences, such as @key{C-x C-f}, Emacs uses the minibuffer to read |
| @@ -110,7 +114,7 @@ dragging will alter the foreground color. Shift dragging will alter the | |||
| 110 | background color. | 114 | background color. |
| 111 | 115 | ||
| 112 | @c To make the changes permanent select the "Save Options" | 116 | @c To make the changes permanent select the "Save Options" |
| 113 | @c item in the "Options" menu, or run @code{menu-bar-options-save}. | 117 | @c item in the "Options" menu, or run @code{menu-bar-options-save}. |
| 114 | 118 | ||
| 115 | Useful in this context is the listing of all faces obtained by @key{M-x} | 119 | Useful in this context is the listing of all faces obtained by @key{M-x} |
| 116 | @code{list-faces-display}. | 120 | @code{list-faces-display}. |
| @@ -193,7 +197,7 @@ font are stored in the variables @code{ns-input-font} and | |||
| 193 | @code{ns-input-fontsize}, respectively. | 197 | @code{ns-input-fontsize}, respectively. |
| 194 | 198 | ||
| 195 | @item ns-power-off | 199 | @item ns-power-off |
| 196 | This event occurs when the user logs out and Emacs is still running, or when | 200 | This event occurs when the user logs out and Emacs is still running, or when |
| 197 | `Quit Emacs' is chosen from the application menu. | 201 | `Quit Emacs' is chosen from the application menu. |
| 198 | The default behavior is to save all file-visiting buffers. | 202 | The default behavior is to save all file-visiting buffers. |
| 199 | @end table | 203 | @end table |
| @@ -208,26 +212,9 @@ and return the result as a string. You can also use the Lisp function | |||
| 208 | services and receive the results back. Note that you may need to | 212 | services and receive the results back. Note that you may need to |
| 209 | restart Emacs to access newly-available services. | 213 | restart Emacs to access newly-available services. |
| 210 | 214 | ||
| 211 | |||
| 212 | @node GNUstep Support, , Mac / GNUstep Events, Mac OS / GNUstep | 215 | @node GNUstep Support, , Mac / GNUstep Events, Mac OS / GNUstep |
| 213 | @section GNUstep Support | 216 | @section GNUstep Support |
| 214 | 217 | ||
| 215 | Emacs can be built and run under GNUstep, however there are still some | 218 | Emacs can be built and run under GNUstep, but there are still some |
| 216 | issues to be addressed. Interested developers should contact | 219 | issues to be addressed. Interested developers should contact |
| 217 | @email{emacs-devel@@gnu.org}. | 220 | @email{emacs-devel@@gnu.org}. |
| 218 | |||
| 219 | @c Presumably no longer relevant since CANNOT_DUMP removed 2009-05-06: | ||
| 220 | @ignore | ||
| 221 | In particular, it may be necessary to run @samp{make bootstrap} with a | ||
| 222 | plain X configuration, then @samp{make clean} and @samp{./configure | ||
| 223 | --with-ns} followed by @samp{make install}. | ||
| 224 | |||
| 225 | Currently CANNOT_DUMP is automatically enabled in GNUstep configurations, | ||
| 226 | because the unex file(s) for GNUstep, mainly @samp{unexelf.c}, have not been | ||
| 227 | updated yet with the ``zone'' code in and related to @samp{unexmacosx.c}. | ||
| 228 | @end ignore | ||
| 229 | |||
| 230 | |||
| 231 | @ignore | ||
| 232 | arch-tag: a822c2ab-4273-4997-927e-c153bb71dcf6 | ||
| 233 | @end ignore | ||
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index b407f5b9c99..cf504b6be2a 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi | |||
| @@ -24,20 +24,20 @@ programs. | |||
| 24 | @section Version Control | 24 | @section Version Control |
| 25 | @cindex version control | 25 | @cindex version control |
| 26 | 26 | ||
| 27 | A @dfn{version control system} is a package that can record multiple | 27 | A @dfn{version control system} is a program that can record multiple |
| 28 | versions of a source file, storing information such as the creation | 28 | versions of a source file, storing information such as the creation |
| 29 | time of each version, who created it, and a description of what was | 29 | time of each version, who made it, and a description of what was |
| 30 | changed in that version. | 30 | changed. |
| 31 | 31 | ||
| 32 | The Emacs version control interface is called VC. Its commands work | 32 | The Emacs version control interface is called @dfn{VC}. VC commands |
| 33 | with several different version control systems; currently, it supports | 33 | work with several different version control systems; currently, it |
| 34 | GNU Arch, Bazaar, CVS, Git, Mercurial, Monotone, RCS, SCCS/CSSC, and | 34 | supports GNU Arch, Bazaar, CVS, Git, Mercurial, Monotone, RCS, |
| 35 | Subversion. Of these, the GNU project distributes CVS, GNU Arch, RCS, | 35 | SCCS/CSSC, and Subversion. Of these, the GNU project distributes CVS, |
| 36 | and Bazaar. | 36 | Arch, RCS, and Bazaar. |
| 37 | 37 | ||
| 38 | VC is enabled automatically whenever you visit a file that is | 38 | VC is enabled automatically whenever you visit a file governed by a |
| 39 | governed by a version control system. To disable VC entirely, set the | 39 | version control system. To disable VC entirely, set the customizable |
| 40 | customizable variable @code{vc-handled-backends} to @code{nil} | 40 | variable @code{vc-handled-backends} to @code{nil} |
| 41 | @iftex | 41 | @iftex |
| 42 | (@pxref{Customizing VC,,,emacs-xtra, Specialized Emacs Features}). | 42 | (@pxref{Customizing VC,,,emacs-xtra, Specialized Emacs Features}). |
| 43 | @end iftex | 43 | @end iftex |
| @@ -49,6 +49,7 @@ customizable variable @code{vc-handled-backends} to @code{nil} | |||
| 49 | * Introduction to VC:: How version control works in general. | 49 | * Introduction to VC:: How version control works in general. |
| 50 | * VC Mode Line:: How the mode line shows version control status. | 50 | * VC Mode Line:: How the mode line shows version control status. |
| 51 | * Basic VC Editing:: How to edit a file under version control. | 51 | * Basic VC Editing:: How to edit a file under version control. |
| 52 | * Log Buffer:: Features available in log entry buffers. | ||
| 52 | * Old Revisions:: Examining and comparing old versions. | 53 | * Old Revisions:: Examining and comparing old versions. |
| 53 | * Secondary VC Commands:: The commands used a little less frequently. | 54 | * Secondary VC Commands:: The commands used a little less frequently. |
| 54 | * VC Directory Mode:: Listing files managed by version control. | 55 | * VC Directory Mode:: Listing files managed by version control. |
| @@ -65,12 +66,13 @@ customizable variable @code{vc-handled-backends} to @code{nil} | |||
| 65 | @subsection Introduction to Version Control | 66 | @subsection Introduction to Version Control |
| 66 | 67 | ||
| 67 | VC allows you to use a version control system from within Emacs, | 68 | VC allows you to use a version control system from within Emacs, |
| 68 | integrating the version control operations smoothly with editing. | 69 | integrating the version control operations smoothly with editing. It |
| 69 | Though VC cannot completely bridge the gaps between version control | 70 | provides a uniform interface for common operations in many version |
| 70 | systems with widely differing capabilities, it does provide a uniform | 71 | control operations. |
| 71 | interface to many version control operations. Regardless of which | 72 | |
| 72 | version control system is in use, you will be able to do basic | 73 | Some uncommon or intricate version control operations, such as |
| 73 | operations in much the same way. | 74 | altering repository settings, are not supported in VC. You should |
| 75 | perform such tasks outside Emacs, e.g. via the command line. | ||
| 74 | 76 | ||
| 75 | This section provides a general overview of version control, and | 77 | This section provides a general overview of version control, and |
| 76 | describes the version control systems that VC supports. You can skip | 78 | describes the version control systems that VC supports. You can skip |
| @@ -81,6 +83,9 @@ you want to use. | |||
| 81 | * Why Version Control?:: Understanding the problems it addresses. | 83 | * Why Version Control?:: Understanding the problems it addresses. |
| 82 | * Version Control Systems:: Supported version control back-end systems. | 84 | * Version Control Systems:: Supported version control back-end systems. |
| 83 | * VCS Concepts:: Words and concepts related to version control. | 85 | * VCS Concepts:: Words and concepts related to version control. |
| 86 | * VCS Merging:: How file conflicts are handled. | ||
| 87 | * VCS Changesets:: How changes are grouped. | ||
| 88 | * VCS Repositories:: Where version control repositories are stored. | ||
| 84 | * Types of Log File:: The VCS log in contrast to the ChangeLog. | 89 | * Types of Log File:: The VCS log in contrast to the ChangeLog. |
| 85 | @end menu | 90 | @end menu |
| 86 | 91 | ||
| @@ -112,8 +117,8 @@ vitally important form of communication among developers. | |||
| 112 | @subsubsection Supported Version Control Systems | 117 | @subsubsection Supported Version Control Systems |
| 113 | 118 | ||
| 114 | @cindex back end (version control) | 119 | @cindex back end (version control) |
| 115 | VC currently works with many different version control systems or | 120 | VC currently works with many different version control systems, |
| 116 | @dfn{back ends}: | 121 | which it refers to as @dfn{back ends}: |
| 117 | 122 | ||
| 118 | @itemize @bullet | 123 | @itemize @bullet |
| 119 | 124 | ||
| @@ -134,73 +139,60 @@ control system. | |||
| 134 | @cindex RCS | 139 | @cindex RCS |
| 135 | @item | 140 | @item |
| 136 | RCS is the free version control system around which VC was initially | 141 | RCS is the free version control system around which VC was initially |
| 137 | built. Almost everything you can do with RCS can be done through VC. | 142 | built. It is relatively primitive: it cannot be used over the |
| 138 | However, you cannot use RCS over the network, and it only works at the | 143 | network, and works at the level of individual files. Almost |
| 139 | level of individual files rather than projects. | 144 | everything you can do with RCS can be done through VC. |
| 140 | 145 | ||
| 141 | @cindex CVS | 146 | @cindex CVS |
| 142 | @item | 147 | @item |
| 143 | CVS is the free version control system that was, until recently (circa | 148 | CVS is the free version control system that was, until recently (circa |
| 144 | 2008), used by the majority of free software projects. Nowadays, it | 149 | 2008), used by the majority of free software projects. Nowadays, it |
| 145 | is slowly being superseded by newer systems. CVS allows concurrent | 150 | is slowly being superseded by newer systems. CVS allows concurrent |
| 146 | multi-user development either locally or over the network. It lacks | 151 | multi-user development either locally or over the network. Unlike |
| 147 | support for atomic commits or file moving/renaming. VC supports all | 152 | newer systems, it lacks support for atomic commits and file |
| 148 | basic editing operations under CVS. For some less common tasks, you | 153 | moving/renaming. VC supports all basic editing operations under CVS. |
| 149 | still need to call CVS from the command line. Note also that before | ||
| 150 | using CVS you must set up a repository, which is a subject too complex | ||
| 151 | to treat here. | ||
| 152 | 154 | ||
| 153 | @cindex SVN | 155 | @cindex SVN |
| 154 | @cindex Subversion | 156 | @cindex Subversion |
| 155 | @item | 157 | @item |
| 156 | Subversion (SVN) is a free version control system designed to be | 158 | Subversion (SVN) is a free version control system designed to be |
| 157 | similar to CVS but without its problems. It supports atomic commits | 159 | similar to CVS but without its problems (e.g., it supports atomic |
| 158 | of filesets, and versioning of directories, symbolic links, meta-data, | 160 | commits of filesets, and versioning of directories, symbolic links, |
| 159 | renames, copies, and deletes. | 161 | meta-data, renames, copies, and deletes). |
| 160 | 162 | ||
| 161 | @cindex GNU Arch | 163 | @cindex GNU Arch |
| 162 | @cindex Arch | 164 | @cindex Arch |
| 163 | @item | 165 | @item |
| 164 | GNU Arch is a version control system designed for distributed work. | 166 | GNU Arch is one of the earliest @dfn{distributed} version control |
| 165 | It differs in many ways from older systems like CVS and RCS. It | 167 | systems (the other being Monotone). @xref{VCS Concepts}, for a |
| 166 | provides different methods for interoperating between users, support | 168 | description of distributed version control systems. It is no longer |
| 167 | for offline operations, and good branching and merging features. It | 169 | under active development, and has been deprecated in favor of Bazaar. |
| 168 | also supports atomic commits of filesets and file moving/renaming. VC | ||
| 169 | does not support all operations provided by GNU Arch, so you must | ||
| 170 | sometimes invoke it from the command line. | ||
| 171 | 170 | ||
| 172 | @cindex git | 171 | @cindex git |
| 173 | @item | 172 | @item |
| 174 | Git is a distributed version control system invented by Linus Torvalds to support | 173 | Git is a distributed version control system originally invented by |
| 175 | development of Linux (his kernel). It supports atomic commits of filesets and | 174 | Linus Torvalds to support development of Linux (his kernel). VC |
| 176 | file moving/renaming. One significant feature of git is that it | 175 | supports many common git operations, but others, such as repository |
| 177 | largely abolishes the notion of a single centralized repository; | 176 | syncing, must be done from the command line. |
| 178 | instead, each working copy of a git project is its own repository and | ||
| 179 | coordination is done through repository-sync operations. VC supports | ||
| 180 | most git operations, with the exception of news merges and repository | ||
| 181 | syncing; these must be done from the command line. | ||
| 182 | 177 | ||
| 183 | @cindex hg | 178 | @cindex hg |
| 184 | @cindex Mercurial | 179 | @cindex Mercurial |
| 185 | @item | 180 | @item |
| 186 | Mercurial (hg) is a distributed version control system broadly | 181 | Mercurial (hg) is a distributed version control system broadly |
| 187 | resembling GNU Arch and git, with atomic fileset commits and file | 182 | resembling git. VC supports most Mercurial commands, with the |
| 188 | moving/renaming. Like git, it is fully decentralized. VC supports | 183 | exception of repository sync operations. |
| 189 | most Mercurial commands, with the exception of repository sync | ||
| 190 | operations; this needs to be done from the command line. | ||
| 191 | 184 | ||
| 192 | @cindex bzr | 185 | @cindex bzr |
| 193 | @cindex Bazaar | 186 | @cindex Bazaar |
| 194 | @item | 187 | @item |
| 195 | Bazaar (bzr) is a distributed version control system that supports both | 188 | Bazaar (bzr) is a distributed version control system that supports |
| 196 | repository-based and distributed versioning, with atomic fileset | 189 | both repository-based and distributed versioning. VC supports most |
| 197 | commits and file moving/renaming. VC supports most basic editing | 190 | basic editing operations under Bazaar. |
| 198 | operations under Bazaar. | ||
| 199 | @end itemize | 191 | @end itemize |
| 200 | 192 | ||
| 201 | Previous versions of VC supported a version control system known as | 193 | Previous versions of VC supported a version control system known as |
| 202 | Meta-CVS. This support has been dropped because of limited interest | 194 | Meta-CVS. This support was dropped due to limited interest from users |
| 203 | from users and developers. | 195 | and developers. |
| 204 | 196 | ||
| 205 | @node VCS Concepts | 197 | @node VCS Concepts |
| 206 | @subsubsection Concepts of Version Control | 198 | @subsubsection Concepts of Version Control |
| @@ -216,11 +208,11 @@ as @dfn{log entries} that describe the changes made to each file. | |||
| 216 | 208 | ||
| 217 | @cindex work file | 209 | @cindex work file |
| 218 | @cindex checking out files | 210 | @cindex checking out files |
| 219 | A file @dfn{checked out} of a repository is called the @dfn{work | 211 | The copy of a version-controlled file that you actually edit is |
| 220 | file}. You edit the work file and make changes in it, as you would | 212 | called the @dfn{work file}. You can change each work file as you |
| 221 | with an ordinary file. After you are done with a set of changes, you | 213 | would an ordinary file. After you are done with a set of changes, you |
| 222 | @dfn{check in} or @dfn{commit} the file; this records the changes in | 214 | @dfn{commit} (or @dfn{check in}) the changes; this records the changes |
| 223 | the repository, along with a log entry for those changes. | 215 | in the repository, along with a descriptive log entry. |
| 224 | 216 | ||
| 225 | @cindex revision | 217 | @cindex revision |
| 226 | @cindex revision ID | 218 | @cindex revision ID |
| @@ -231,12 +223,15 @@ on the version control system; in the simplest case, it is just an | |||
| 231 | integer. | 223 | integer. |
| 232 | 224 | ||
| 233 | To go beyond these basic concepts, you will need to understand three | 225 | To go beyond these basic concepts, you will need to understand three |
| 234 | aspects in which version control systems differ. | 226 | aspects in which version control systems differ. As explained in the |
| 235 | They can be locking-based or merging-based; they can be file-based or | 227 | next three sections, they can be lock-based or merge-based; file-based |
| 236 | changeset-based; and they can be centralized or decentralized. VC | 228 | or changeset-based; and centralized or decentralized. VC handles all |
| 237 | handles all these modes of operation, but it cannot hide the differences. | 229 | these modes of operation, but it cannot hide the differences. |
| 238 | 230 | ||
| 231 | @node VCS Merging | ||
| 232 | @subsubsection Merge-based vs lock-based Version Control | ||
| 239 | @cindex locking versus merging | 233 | @cindex locking versus merging |
| 234 | |||
| 240 | A version control system typically has some mechanism to coordinate | 235 | A version control system typically has some mechanism to coordinate |
| 241 | between users who want to change the same file. There are two ways to | 236 | between users who want to change the same file. There are two ways to |
| 242 | do this: merging and locking. | 237 | do this: merging and locking. |
| @@ -244,8 +239,7 @@ do this: merging and locking. | |||
| 244 | In a version control system that uses merging, each user may check | 239 | In a version control system that uses merging, each user may check |
| 245 | out and modify a work file at any time. The system lets you | 240 | out and modify a work file at any time. The system lets you |
| 246 | @dfn{merge} your work file, which may contain changes that have not | 241 | @dfn{merge} your work file, which may contain changes that have not |
| 247 | been checked in, with the latest changes that others have checked into | 242 | been committed, with the latest changes that others have committed. |
| 248 | the repository. | ||
| 249 | 243 | ||
| 250 | Older version control systems use a @dfn{locking} scheme instead. | 244 | Older version control systems use a @dfn{locking} scheme instead. |
| 251 | Here, work files are normally read-only. To edit a file, you ask the | 245 | Here, work files are normally read-only. To edit a file, you ask the |
| @@ -253,7 +247,7 @@ version control system to make it writable for you by @dfn{locking} | |||
| 253 | it; only one user can lock a given file at any given time. This | 247 | it; only one user can lock a given file at any given time. This |
| 254 | procedure is analogous to, but different from, the locking that Emacs | 248 | procedure is analogous to, but different from, the locking that Emacs |
| 255 | uses to detect simultaneous editing of ordinary files | 249 | uses to detect simultaneous editing of ordinary files |
| 256 | (@pxref{Interlocking}). When you check in your changes, that unlocks | 250 | (@pxref{Interlocking}). When you commit your changes, that unlocks |
| 257 | the file, and the work file becomes read-only again. Other users may | 251 | the file, and the work file becomes read-only again. Other users may |
| 258 | then lock the file to make their own changes. | 252 | then lock the file to make their own changes. |
| 259 | 253 | ||
| @@ -261,8 +255,8 @@ then lock the file to make their own changes. | |||
| 261 | users try to modify the same file at the same time. Locking systems | 255 | users try to modify the same file at the same time. Locking systems |
| 262 | have @dfn{lock conflicts}; a user may try to check a file out and be | 256 | have @dfn{lock conflicts}; a user may try to check a file out and be |
| 263 | unable to because it is locked. In merging systems, @dfn{merge | 257 | unable to because it is locked. In merging systems, @dfn{merge |
| 264 | conflicts} happen when you check in a change to a file that conflicts | 258 | conflicts} happen when you commit a change to a file that conflicts |
| 265 | with a change checked in by someone else after your checkout. Both | 259 | with a change committed by someone else after your checkout. Both |
| 266 | kinds of conflict have to be resolved by human judgment and | 260 | kinds of conflict have to be resolved by human judgment and |
| 267 | communication. Experience has shown that merging is superior to | 261 | communication. Experience has shown that merging is superior to |
| 268 | locking, both in convenience to developers and in minimizing the | 262 | locking, both in convenience to developers and in minimizing the |
| @@ -275,27 +269,33 @@ Distributed version control systems, such as GNU Arch, git, and | |||
| 275 | Mercurial, are exclusively merging-based. | 269 | Mercurial, are exclusively merging-based. |
| 276 | 270 | ||
| 277 | VC mode supports both locking and merging version control. The | 271 | VC mode supports both locking and merging version control. The |
| 278 | terms ``checkin'' and ``checkout'' come from locking-based version | 272 | terms ``commit'' and ``update'' are used in newer version control |
| 279 | control systems; newer version control systems have slightly different | 273 | systems; older lock-based systems use the terms ``check in'' and |
| 280 | operations usually called ``commit'' and ``update'', but VC hides the | 274 | ``check out''. VC hides the differences between them as much as |
| 281 | differences between them as much as possible. | 275 | possible. |
| 276 | |||
| 277 | @node VCS Changesets | ||
| 278 | @subsubsection Changeset-based vs File-based Version Control | ||
| 282 | 279 | ||
| 283 | @cindex files versus changesets. | 280 | @cindex changesets |
| 284 | On SCCS, RCS, CVS, and other early version control systems, version | 281 | On SCCS, RCS, CVS, and other early version control systems, version |
| 285 | control operations are @dfn{file-based}: each file has its own comment | 282 | control operations are @dfn{file-based}: each file has its own comment |
| 286 | and revision history separate from that of all other files in the | 283 | and revision history separate from that of all other files. Newer |
| 287 | system. Later systems, beginning with Subversion, are | 284 | systems, beginning with Subversion, are @dfn{changeset-based}: a |
| 288 | @dfn{changeset-based}: a checkin may include changes to several files, | 285 | checkin may include changes to several files, and the entire set of |
| 289 | and the entire set of changes is treated as a unit by the system. Any | 286 | changes is handled as a unit. Any comment associated with the change |
| 290 | comment associated with the change does not belong to a single file, | 287 | does not belong to a single file, but to the changeset itself. |
| 291 | but to the changeset itself. | ||
| 292 | 288 | ||
| 293 | Changeset-based version control is more flexible and powerful than | 289 | Changeset-based version control is more flexible and powerful than |
| 294 | file-based version control; usually, when a change to multiple files | 290 | file-based version control; usually, when a change to multiple files |
| 295 | has to be reversed, it's good to be able to easily identify and remove | 291 | has to be reversed, it's good to be able to easily identify and remove |
| 296 | all of it. | 292 | all of it. |
| 297 | 293 | ||
| 298 | @cindex centralized vs. decentralized version control | 294 | @node VCS Repositories |
| 295 | @subsubsection Decentralized vs Centralized Repositories | ||
| 296 | |||
| 297 | @cindex centralized version control | ||
| 298 | @cindex decentralized version control | ||
| 299 | Early version control systems were designed around a | 299 | Early version control systems were designed around a |
| 300 | @dfn{centralized} model in which each project has only one repository | 300 | @dfn{centralized} model in which each project has only one repository |
| 301 | used by all developers. SCCS, RCS, CVS, and Subversion share this | 301 | used by all developers. SCCS, RCS, CVS, and Subversion share this |
| @@ -306,14 +306,12 @@ point for reliability and efficiency. | |||
| 306 | control, later implemented in git, Mercurial, and Bazaar. A project | 306 | control, later implemented in git, Mercurial, and Bazaar. A project |
| 307 | may have several different repositories, and these systems support a | 307 | may have several different repositories, and these systems support a |
| 308 | sort of super-merge between repositories that tries to reconcile their | 308 | sort of super-merge between repositories that tries to reconcile their |
| 309 | change histories. At the limit, each developer has his/her own | 309 | change histories. In effect, there is one repository for each |
| 310 | repository, and repository merges replace checkin/commit operations. | 310 | developer, and repository merges take the place of commit operations. |
| 311 | 311 | ||
| 312 | VC's job is to help you manage the traffic between your personal | 312 | VC helps you manage the traffic between your personal workfiles and |
| 313 | workfiles and a repository. Whether that repository is a single | 313 | a repository. Whether the repository is a single master, or one of a |
| 314 | master or one of a network of peer repositories is not something VC | 314 | network of peer repositories, is not something VC has to care about. |
| 315 | has to care about. Thus, the difference between a centralized and a | ||
| 316 | decentralized version control system is invisible to VC mode. | ||
| 317 | 315 | ||
| 318 | @node Types of Log File | 316 | @node Types of Log File |
| 319 | @subsubsection Types of Log File | 317 | @subsubsection Types of Log File |
| @@ -323,9 +321,9 @@ decentralized version control system is invisible to VC mode. | |||
| 323 | 321 | ||
| 324 | Projects that use a version control system can have two types of log | 322 | Projects that use a version control system can have two types of log |
| 325 | for changes. One is the log maintained by the version control system: | 323 | for changes. One is the log maintained by the version control system: |
| 326 | each time you check in a change, you fill out a @dfn{log entry} for | 324 | each time you commit a change, you fill out a @dfn{log entry} for the |
| 327 | the change (@pxref{Log Buffer}). This is called the @dfn{version | 325 | change (@pxref{Log Buffer}). This is called the @dfn{version control |
| 328 | control log}. | 326 | log}. |
| 329 | 327 | ||
| 330 | The other kind of log is the file @file{ChangeLog} (@pxref{Change | 328 | The other kind of log is the file @file{ChangeLog} (@pxref{Change |
| 331 | Log}). It provides a chronological record of all changes to a large | 329 | Log}). It provides a chronological record of all changes to a large |
| @@ -365,32 +363,29 @@ change, and later use the @kbd{C-x v a} command to copy it to | |||
| 365 | @cindex VC, mode line indicator | 363 | @cindex VC, mode line indicator |
| 366 | 364 | ||
| 367 | When you visit a file that is under version control, Emacs indicates | 365 | When you visit a file that is under version control, Emacs indicates |
| 368 | this on the mode line. For example, @samp{RCS-1.3} says that the RCS | 366 | this on the mode line. For example, @samp{Bzr-1223} says that Bazaar |
| 369 | back end is used for that file, and the current version of the file is | 367 | is used for that file, and the current revision ID is 1223. |
| 370 | 1.3. | ||
| 371 | |||
| 372 | The first part of the VC mode-line indicator is the name of the back | ||
| 373 | end: @samp{RCS}, @samp{CVS}, @samp{Bzr}, etc. The back-end name is | ||
| 374 | followed by a single character and the version of the file. | ||
| 375 | 368 | ||
| 376 | The character between the back-end name and the revision ID | 369 | The character between the back-end name and the revision ID |
| 377 | indicates the version control status of the file. @samp{-} means that | 370 | indicates the status of the work file. In a merge-based version |
| 378 | the work file is not locked (if locking is in use), or not modified (if | 371 | control system, a @samp{-} character indicates that the work file is |
| 379 | locking is not in use). @samp{:} indicates that the file is locked, or | 372 | unmodified, and @samp{:} indicates that it has been modified. |
| 380 | that it is modified. If the file is locked by some other user (for | 373 | @samp{!} indicates that the file contains conflicts as result of a |
| 374 | recent merge operation (@pxref{Merging}), or that the file was removed | ||
| 375 | from the version control. Finally, @samp{?} means that the file is | ||
| 376 | under version control, but is missing from the working tree. | ||
| 377 | |||
| 378 | In a lock-based system, @samp{-} indicates an unlocked file, and | ||
| 379 | @samp{:} a locked file; if the file is locked by another user (for | ||
| 381 | instance, @samp{jim}), that is displayed as @samp{RCS:jim:1.3}. | 380 | instance, @samp{jim}), that is displayed as @samp{RCS:jim:1.3}. |
| 382 | @samp{@@} means that the file was locally added, but not yet committed | 381 | @samp{@@} means that the file was locally added, but not yet committed |
| 383 | to the master repository. @samp{!} indicates that the file contains | 382 | to the master repository. |
| 384 | conflicts as result of a recent merge operation (@pxref{Merging}), or | ||
| 385 | that the file was removed from the version control. Finally, @samp{?} | ||
| 386 | means that the file is under version control, but is missing from the | ||
| 387 | working tree. | ||
| 388 | 383 | ||
| 389 | On a graphical display, you can move the mouse over this mode line | 384 | On a graphical display, you can move the mouse over this mode line |
| 390 | indicator to pop up a ``tool-tip'', which displays a more verbose | 385 | indicator to pop up a ``tool-tip'', which displays a more verbose |
| 391 | description of the version control status. Pressing @kbd{Mouse-1} | 386 | description of the version control status. Pressing @kbd{Mouse-1} |
| 392 | over the indicator pops up a menu of VC commands. This menu is | 387 | over the indicator pops up a menu of VC commands, identical to |
| 393 | identical to the @samp{Tools / Version Control} menu item. | 388 | @samp{Tools / Version Control} on the menu bar. |
| 394 | 389 | ||
| 395 | @vindex auto-revert-check-vc-info | 390 | @vindex auto-revert-check-vc-info |
| 396 | When Auto Revert mode (@pxref{Reverting}) reverts a buffer that is | 391 | When Auto Revert mode (@pxref{Reverting}) reverts a buffer that is |
| @@ -442,12 +437,6 @@ command line. All files in a VC fileset must be under the same | |||
| 442 | version control system; if they are not, Emacs signals an error when | 437 | version control system; if they are not, Emacs signals an error when |
| 443 | you attempt to execute a command on the fileset. | 438 | you attempt to execute a command on the fileset. |
| 444 | 439 | ||
| 445 | Support for VC filesets and changeset-based version control systems | ||
| 446 | is the main improvement to VC in Emacs 23. When you mark multi-file | ||
| 447 | VC in a VC Directory buffer, VC operations treat them as a VC fileset, | ||
| 448 | and operate on them all at once if the version control system is | ||
| 449 | changeset-based. @xref{VC Directory Mode}. | ||
| 450 | |||
| 451 | VC filesets are distinct from the ``named filesets'' used for | 440 | VC filesets are distinct from the ``named filesets'' used for |
| 452 | viewing and visiting files in functional groups (@pxref{Filesets}). | 441 | viewing and visiting files in functional groups (@pxref{Filesets}). |
| 453 | Unlike named filesets, VC filesets are not named and don't persist | 442 | Unlike named filesets, VC filesets are not named and don't persist |
| @@ -457,7 +446,6 @@ across sessions. | |||
| 457 | * VC With A Merging VCS:: Without locking: default mode for CVS. | 446 | * VC With A Merging VCS:: Without locking: default mode for CVS. |
| 458 | * VC With A Locking VCS:: RCS in its default mode, SCCS, and optionally CVS. | 447 | * VC With A Locking VCS:: RCS in its default mode, SCCS, and optionally CVS. |
| 459 | * Advanced C-x v v:: Advanced features available with a prefix argument. | 448 | * Advanced C-x v v:: Advanced features available with a prefix argument. |
| 460 | * Log Buffer:: Features available in log entry buffers. | ||
| 461 | @end menu | 449 | @end menu |
| 462 | 450 | ||
| 463 | @node VC With A Merging VCS | 451 | @node VC With A Merging VCS |
| @@ -490,9 +478,9 @@ If you have not changed the work file, but some other user has checked | |||
| 490 | in changes to the repository, merge those changes into the work file. | 478 | in changes to the repository, merge those changes into the work file. |
| 491 | 479 | ||
| 492 | @item | 480 | @item |
| 493 | If you have made modifications to the work file, attempts to check in | 481 | If you have made modifications to the work file, attempt to commit |
| 494 | your changes. To do this, Emacs first reads the log entry for the new | 482 | the changes. To do this, Emacs first reads the log entry for the new |
| 495 | revision (@pxref{Log Buffer}). If some other user has checked in | 483 | revision (@pxref{Log Buffer}). If some other user has committed |
| 496 | changes to the repository since you last checked it out, the checkin | 484 | changes to the repository since you last checked it out, the checkin |
| 497 | fails. In that case, type @kbd{C-x v v} again to merge those changes | 485 | fails. In that case, type @kbd{C-x v v} again to merge those changes |
| 498 | into your own work file; this puts the work file into a ``conflicted'' | 486 | into your own work file; this puts the work file into a ``conflicted'' |
| @@ -507,8 +495,8 @@ trying to commit your own changes, type @kbd{C-x v m @key{RET}}. | |||
| 507 | 495 | ||
| 508 | These rules also apply when you use RCS in its ``non-locking'' mode, | 496 | These rules also apply when you use RCS in its ``non-locking'' mode, |
| 509 | except that changes are not automatically merged from the repository. | 497 | except that changes are not automatically merged from the repository. |
| 510 | Nothing informs you if another user has checked in changes in the same | 498 | Nothing informs you if another user has committed changes in the same |
| 511 | file since you began editing it; when you check in your revision, his | 499 | file since you began editing it; when you commit your revision, his |
| 512 | changes are removed (however, they remain in the repository and are | 500 | changes are removed (however, they remain in the repository and are |
| 513 | thus not irrevocably lost). Therefore, you must verify that the | 501 | thus not irrevocably lost). Therefore, you must verify that the |
| 514 | current revision is unchanged before checking in your changes. In | 502 | current revision is unchanged before checking in your changes. In |
| @@ -528,7 +516,7 @@ If the file is not locked, lock it and make it writable, so that you | |||
| 528 | can change it. | 516 | can change it. |
| 529 | 517 | ||
| 530 | @item | 518 | @item |
| 531 | If the file is locked by you, and contains changes, check in the | 519 | If the file is locked by you, and contains changes, commit the |
| 532 | changes. In order to do this, Emacs first reads the log entry for the | 520 | changes. In order to do this, Emacs first reads the log entry for the |
| 533 | new revision. @xref{Log Buffer}. | 521 | new revision. @xref{Log Buffer}. |
| 534 | 522 | ||
| @@ -544,12 +532,12 @@ locked the file, to inform him of what has happened. | |||
| 544 | @end itemize | 532 | @end itemize |
| 545 | 533 | ||
| 546 | These rules also apply when you use CVS in locking mode, except | 534 | These rules also apply when you use CVS in locking mode, except |
| 547 | that there is no such thing as stealing a lock. | 535 | that CVS does not support stealing a lock. |
| 548 | 536 | ||
| 549 | @node Advanced C-x v v | 537 | @node Advanced C-x v v |
| 550 | @subsubsection Advanced Control in @kbd{C-x v v} | 538 | @subsubsection Advanced Control in @kbd{C-x v v} |
| 551 | 539 | ||
| 552 | @cindex revision ID to check in/out | 540 | @cindex revision ID in version control |
| 553 | When you give a prefix argument to @code{vc-next-action} (@kbd{C-u | 541 | When you give a prefix argument to @code{vc-next-action} (@kbd{C-u |
| 554 | C-x v v}), it still performs the next logical version control | 542 | C-x v v}), it still performs the next logical version control |
| 555 | operation, but accepts additional arguments to specify precisely how | 543 | operation, but accepts additional arguments to specify precisely how |
| @@ -558,8 +546,8 @@ to do the operation. | |||
| 558 | @itemize @bullet | 546 | @itemize @bullet |
| 559 | @item | 547 | @item |
| 560 | If the file is modified (or locked), you can specify the revision ID | 548 | If the file is modified (or locked), you can specify the revision ID |
| 561 | to use for the new version that you check in. This is one way | 549 | to use for the new version that you commit. This is one way to create |
| 562 | to create a new branch (@pxref{Branches}). | 550 | a new branch (@pxref{Branches}). |
| 563 | 551 | ||
| 564 | @item | 552 | @item |
| 565 | If the file is not modified (and unlocked), you can specify the | 553 | If the file is not modified (and unlocked), you can specify the |
| @@ -585,34 +573,53 @@ Features}). | |||
| 585 | @end itemize | 573 | @end itemize |
| 586 | 574 | ||
| 587 | @node Log Buffer | 575 | @node Log Buffer |
| 588 | @subsubsection Features of the Log Entry Buffer | 576 | @subsection Features of the Log Entry Buffer |
| 577 | |||
| 578 | When you tell VC to commit a change, it pops up a buffer called | ||
| 579 | @samp{*VC-Log*}. In this buffer, you should write a @dfn{log entry} | ||
| 580 | describing the changes you have made (@pxref{Why Version Control?}). | ||
| 581 | After you are done, type @kbd{C-c C-c}; this exits the buffer and | ||
| 582 | commits the change, together with your log entry. | ||
| 583 | |||
| 584 | While in the @samp{*VC-Log*} buffer, you can write one or more | ||
| 585 | @dfn{header lines}, specifying additional information to be supplied | ||
| 586 | to the version control system. Each header line must occupy a single | ||
| 587 | line at the top of the buffer; the first line that is not a header | ||
| 588 | line is treated as the start of the log entry. For example, the | ||
| 589 | following header line states that the present change was not written | ||
| 590 | by you, but by another developer: | ||
| 589 | 591 | ||
| 590 | When you check in changes, Emacs pops up a buffer called | 592 | @smallexample |
| 591 | @samp{*VC-Log*} for you to enter a log entry. | 593 | Author: J. R. Hacker <jrh@@example.com> |
| 594 | @end smallexample | ||
| 592 | 595 | ||
| 593 | After you have finished editing the log message, type @kbd{C-c C-c} | 596 | @noindent |
| 594 | to exit the buffer and commit the change. | 597 | Apart from the @samp{Author} header, Emacs recognizes the headers |
| 598 | @samp{Date} (a manually-specified commit time) and @samp{Fixes} (a | ||
| 599 | reference to a bug fixed by the change). Not all version control | ||
| 600 | systems recognize all headers: Bazaar recognizes all three headers, | ||
| 601 | while git, Mercurial, and Monotone recognizes only @samp{Author} and | ||
| 602 | @samp{Summary}. If you specify a header for a version control that | ||
| 603 | does not support it, the header is treated as part of the log entry. | ||
| 595 | 604 | ||
| 596 | @findex log-edit-show-files | 605 | @findex log-edit-show-files |
| 597 | @findex log-edit-show-diff | 606 | @findex log-edit-show-diff |
| 598 | In the @samp{*VC-Log*} buffer, typing @kbd{C-c C-f} | 607 | Type @kbd{C-c C-f} (@code{log-edit-show-files}) to display a list of |
| 599 | (@code{log-edit-show-files}) displays a list of files in the VC | 608 | files in the current VC fileset. If you called @kbd{C-x v v} directly |
| 600 | fileset you are committing. If you called @kbd{C-x v v} directly from | 609 | from a work file, the fileset consists of that single file; if you |
| 601 | a work file, the VC fileset consists of that single file, so this | 610 | called @kbd{C-x v v} from a VC directory buffer (@pxref{VC Directory |
| 602 | command is not very useful. If you called @kbd{C-x v v} from a VC | 611 | Mode}), the fileset may consist of multiple files. |
| 603 | directory buffer, the VC fileset may consist of multiple files | ||
| 604 | (@pxref{VC Directory Mode}). | ||
| 605 | 612 | ||
| 606 | @findex log-edit-insert-changelog | 613 | @findex log-edit-insert-changelog |
| 607 | Type @kbd{C-c C-d} (@code{log-edit-show-diff}) to show a ``diff'' of | 614 | Type @kbd{C-c C-d} (@code{log-edit-show-diff}) to show a @dfn{diff} |
| 608 | the changes you have made (i.e., the differences between the work file | 615 | of the changes you have made (i.e., the differences between the work |
| 609 | and the repository revision from which you started editing the file). | 616 | file and the repository revision from which you started editing). |
| 610 | The diff is displayed in a special buffer in another window. | 617 | @xref{Old Revisions}. |
| 611 | @xref{Comparing Files}. | 618 | |
| 612 | 619 | If the current VC fileset includes one or more @file{ChangeLog} | |
| 613 | If you have written an entry in the @file{ChangeLog} (@pxref{Change | 620 | files (@pxref{Change Log}), type @kbd{C-c C-a} |
| 614 | Log}), type @kbd{C-c C-a} (@code{log-edit-insert-changelog}) to pull | 621 | (@code{log-edit-insert-changelog}) to pull the relevant entries into |
| 615 | it into the @samp{*VC-Log*} buffer. If the topmost item in the | 622 | the @samp{*VC-Log*} buffer. If the topmost item in each |
| 616 | @file{ChangeLog} was made under your user name on the current date, | 623 | @file{ChangeLog} was made under your user name on the current date, |
| 617 | this command searches that item for entries that match the file(s) to | 624 | this command searches that item for entries that match the file(s) to |
| 618 | be committed; if found, these entries are inserted. | 625 | be committed; if found, these entries are inserted. |
| @@ -627,7 +634,7 @@ the revision control log. | |||
| 627 | 634 | ||
| 628 | To abort a check-in, just @strong{don't} type @kbd{C-c C-c} in that | 635 | To abort a check-in, just @strong{don't} type @kbd{C-c C-c} in that |
| 629 | buffer. You can switch buffers and do other editing. As long as you | 636 | buffer. You can switch buffers and do other editing. As long as you |
| 630 | don't try to check in another file, the entry you were editing remains | 637 | don't try to commit another file, the entry you were editing remains |
| 631 | in the @samp{*VC-Log*} buffer, and you can go back to that buffer at | 638 | in the @samp{*VC-Log*} buffer, and you can go back to that buffer at |
| 632 | any time to complete the check-in. | 639 | any time to complete the check-in. |
| 633 | 640 | ||
| @@ -636,7 +643,7 @@ convenient to specify the same log entry for many of the files. (This | |||
| 636 | is the normal way to do things on a changeset-oriented system, where | 643 | is the normal way to do things on a changeset-oriented system, where |
| 637 | comments are attached to changesets rather than the history of | 644 | comments are attached to changesets rather than the history of |
| 638 | individual files.) The most convenient way to do this is to mark all | 645 | individual files.) The most convenient way to do this is to mark all |
| 639 | the files in VC Directory Mode and check in from there; the log buffer | 646 | the files in VC Directory Mode and commit from there; the log buffer |
| 640 | will carry the fileset information with it and do a group commit when | 647 | will carry the fileset information with it and do a group commit when |
| 641 | you type @kbd{C-c C-c}. | 648 | you type @kbd{C-c C-c}. |
| 642 | 649 | ||
| @@ -648,7 +655,7 @@ work just like the minibuffer history commands (except that these | |||
| 648 | versions are used outside the minibuffer). | 655 | versions are used outside the minibuffer). |
| 649 | 656 | ||
| 650 | @vindex vc-log-mode-hook | 657 | @vindex vc-log-mode-hook |
| 651 | Each time you check in a change, the log entry buffer is put into VC | 658 | Each time you commit a change, the log entry buffer is put into VC |
| 652 | Log Edit mode, which involves running two hooks: @code{text-mode-hook} | 659 | Log Edit mode, which involves running two hooks: @code{text-mode-hook} |
| 653 | and @code{vc-log-mode-hook}. @xref{Hooks}. | 660 | and @code{vc-log-mode-hook}. @xref{Hooks}. |
| 654 | 661 | ||
| @@ -700,8 +707,12 @@ buffer in a separate window. | |||
| 700 | @kbd{C-x v =} (@code{vc-diff}) compares each file in the current VC | 707 | @kbd{C-x v =} (@code{vc-diff}) compares each file in the current VC |
| 701 | fileset (saving them if necessary) with the repository revision(s) | 708 | fileset (saving them if necessary) with the repository revision(s) |
| 702 | from which you started editing. Note that the latter may or may not | 709 | from which you started editing. Note that the latter may or may not |
| 703 | be the latest revision of the file(s). The diff is displayed in a | 710 | be the latest revision of the file(s). |
| 704 | special buffer in another window. @xref{Comparing Files}. | 711 | |
| 712 | The diff is displayed in another window, in a Diff mode buffer | ||
| 713 | (@pxref{Diff Mode}) named @file{*vc-diff*}. In this buffer, the | ||
| 714 | @kbd{g} (@code{revert-buffer}) command performs the file comparison | ||
| 715 | again, generating a new diff. | ||
| 705 | 716 | ||
| 706 | @findex vc-diff | 717 | @findex vc-diff |
| 707 | @kindex C-u C-x v = | 718 | @kindex C-u C-x v = |
| @@ -1008,7 +1019,7 @@ then decide not to change it. | |||
| 1008 | 1019 | ||
| 1009 | @kindex C-x v c | 1020 | @kindex C-x v c |
| 1010 | @findex vc-rollback | 1021 | @findex vc-rollback |
| 1011 | To cancel a change that you already checked in, use @kbd{C-x v c} | 1022 | To cancel a change that you already committed, use @kbd{C-x v c} |
| 1012 | (@code{vc-rollback}). This command discards all record of the most | 1023 | (@code{vc-rollback}). This command discards all record of the most |
| 1013 | recent checked-in revision, but only if your work file corresponds to | 1024 | recent checked-in revision, but only if your work file corresponds to |
| 1014 | that revision---you cannot use @kbd{C-x v c} to cancel a revision that | 1025 | that revision---you cannot use @kbd{C-x v c} to cancel a revision that |
| @@ -1075,8 +1086,8 @@ output is used. Here is an example using CVS: | |||
| 1075 | @noindent | 1086 | @noindent |
| 1076 | In this example, @samp{file1.c} is modified with respect to the | 1087 | In this example, @samp{file1.c} is modified with respect to the |
| 1077 | repository, and @samp{file2.c} is not. @samp{file3.c} is modified, | 1088 | repository, and @samp{file2.c} is not. @samp{file3.c} is modified, |
| 1078 | but other changes have also been checked in to the repository---you | 1089 | but other changes have also been committed---you need to merge them |
| 1079 | need to merge them with the work file before you can check it in. | 1090 | with the work file before you can check it in. |
| 1080 | 1091 | ||
| 1081 | @vindex vc-stay-local | 1092 | @vindex vc-stay-local |
| 1082 | @vindex vc-cvs-stay-local | 1093 | @vindex vc-cvs-stay-local |
| @@ -1114,7 +1125,7 @@ this includes Version Control subdirectories such as @samp{RCS} and | |||
| 1114 | 1125 | ||
| 1115 | VC Directory mode has a full set of navigation and marking commands | 1126 | VC Directory mode has a full set of navigation and marking commands |
| 1116 | for picking out filesets. Some of these are also available in a | 1127 | for picking out filesets. Some of these are also available in a |
| 1117 | context menu invoked by the @kbd{mouse-2} button. | 1128 | context menu invoked by @kbd{mouse-2}. |
| 1118 | 1129 | ||
| 1119 | Up- and down-arrow keys move in the buffer; @kbd{n} and @kbd{p} also | 1130 | Up- and down-arrow keys move in the buffer; @kbd{n} and @kbd{p} also |
| 1120 | move vertically as in other list-browsing modes. @key{SPC} and | 1131 | move vertically as in other list-browsing modes. @key{SPC} and |
| @@ -1158,7 +1169,8 @@ directory buffer will be used. | |||
| 1158 | 1169 | ||
| 1159 | @kbd{M-s a C-s} does an incremental search on the marked files. | 1170 | @kbd{M-s a C-s} does an incremental search on the marked files. |
| 1160 | 1171 | ||
| 1161 | @kbd{M-s a C-M-s} does an incremental search on the marked files. | 1172 | @kbd{M-s a C-M-s} does an incremental regular expression search |
| 1173 | on the marked files. | ||
| 1162 | 1174 | ||
| 1163 | @cindex stashes in version control | 1175 | @cindex stashes in version control |
| 1164 | @cindex shelves in version control | 1176 | @cindex shelves in version control |
| @@ -1174,11 +1186,11 @@ buffers. Some single-key shortcuts are available as well; @kbd{=}, | |||
| 1174 | @kbd{+}, @kbd{l}, @kbd{i}, and @kbd{v} behave as through prefixed with | 1186 | @kbd{+}, @kbd{l}, @kbd{i}, and @kbd{v} behave as through prefixed with |
| 1175 | @kbd{C-x v}. | 1187 | @kbd{C-x v}. |
| 1176 | 1188 | ||
| 1177 | The command @kbd{C-x v v} (@code{vc-next-action}) operates on all the | 1189 | The command @kbd{C-x v v} (@code{vc-next-action}) operates on all |
| 1178 | marked files, so that you can check in several files at once. | 1190 | the marked files, so that you can commit several files at once. If |
| 1179 | If the underlying VC supports atomic commits of multiple-file | 1191 | the underlying VC supports atomic commits of multiple-file changesets, |
| 1180 | changesets, @kbd{C-x v v} with a selected set of modified but not | 1192 | @kbd{C-x v v} with a selected set of modified but not committed files |
| 1181 | committed files will commit all of them at once as a single changeset. | 1193 | will commit all of them at once as a single changeset. |
| 1182 | 1194 | ||
| 1183 | When @kbd{C-x v v} (@code{vc-next-action}) operates on multiple | 1195 | When @kbd{C-x v v} (@code{vc-next-action}) operates on multiple |
| 1184 | files, all of those files must be either in the same state or in | 1196 | files, all of those files must be either in the same state or in |
| @@ -1261,15 +1273,15 @@ other branch. | |||
| 1261 | @node Creating Branches | 1273 | @node Creating Branches |
| 1262 | @subsubsection Creating New Branches | 1274 | @subsubsection Creating New Branches |
| 1263 | 1275 | ||
| 1264 | To create a new branch from a head revision (one that is the latest in | 1276 | To create a new branch from a head revision (one that is the latest |
| 1265 | the branch that contains it), first select that revision if necessary, | 1277 | in the branch that contains it), first select that revision if |
| 1266 | lock it with @kbd{C-x v v}, and make whatever changes you want. Then, | 1278 | necessary, lock it with @kbd{C-x v v}, and make whatever changes you |
| 1267 | when you check in the changes, use @kbd{C-u C-x v v}. This lets you | 1279 | want. Then, when you commit the changes, use @kbd{C-u C-x v v}. This |
| 1268 | specify the revision ID for the new revision. You should specify a | 1280 | lets you specify the revision ID for the new revision. You should |
| 1269 | suitable branch ID for a branch starting at the current revision. | 1281 | specify a suitable branch ID for a branch starting at the current |
| 1270 | For example, if the current revision is 2.5, the branch ID should be | 1282 | revision. For example, if the current revision is 2.5, the branch ID |
| 1271 | 2.5.1, 2.5.2, and so on, depending on the number of existing branches at | 1283 | should be 2.5.1, 2.5.2, and so on, depending on the number of existing |
| 1272 | that point. | 1284 | branches at that point. |
| 1273 | 1285 | ||
| 1274 | To create a new branch at an older revision (one that is no longer the | 1286 | To create a new branch at an older revision (one that is no longer the |
| 1275 | head of a branch), first select that revision (@pxref{Switching | 1287 | head of a branch), first select that revision (@pxref{Switching |
| @@ -1282,11 +1294,11 @@ revision, that you really mean to create a new branch---if you say no, | |||
| 1282 | you'll be offered a chance to lock the latest revision instead. On | 1294 | you'll be offered a chance to lock the latest revision instead. On |
| 1283 | a merging-based VCS you will skip this step. | 1295 | a merging-based VCS you will skip this step. |
| 1284 | 1296 | ||
| 1285 | Then make your changes and type @kbd{C-x v v} again to check in a new | 1297 | Then make your changes and type @kbd{C-x v v} again to commit a new |
| 1286 | revision. This automatically creates a new branch starting from the | 1298 | revision. This automatically creates a new branch starting from the |
| 1287 | selected revision. You need not specially request a new branch, because | 1299 | selected revision. You need not specially request a new branch, |
| 1288 | that's the only way to add a new revision at a point that is not the head | 1300 | because that's the only way to add a new revision at a point that is |
| 1289 | of a branch. | 1301 | not the head of a branch. |
| 1290 | 1302 | ||
| 1291 | After the branch is created, you ``stay'' on it. That means that | 1303 | After the branch is created, you ``stay'' on it. That means that |
| 1292 | subsequent check-ins create new revisions on that branch. To leave the | 1304 | subsequent check-ins create new revisions on that branch. To leave the |
| @@ -1334,11 +1346,11 @@ type @kbd{C-x v v} to lock revision 1.5 so that you can change it. Next, | |||
| 1334 | type @kbd{C-x v m 1.3.1 @key{RET}}. This takes the entire set of changes on | 1346 | type @kbd{C-x v m 1.3.1 @key{RET}}. This takes the entire set of changes on |
| 1335 | branch 1.3.1 (relative to revision 1.3, where the branch started, up to | 1347 | branch 1.3.1 (relative to revision 1.3, where the branch started, up to |
| 1336 | the last revision on the branch) and merges it into the current revision | 1348 | the last revision on the branch) and merges it into the current revision |
| 1337 | of the work file. You can now check in the changed file, thus creating | 1349 | of the work file. You can now commit the changed file, thus creating |
| 1338 | revision 1.6 containing the changes from the branch. | 1350 | revision 1.6 containing the changes from the branch. |
| 1339 | 1351 | ||
| 1340 | It is possible to do further editing after merging the branch, before | 1352 | It is possible to do further editing after merging the branch, before |
| 1341 | the next check-in. But it is usually wiser to check in the merged | 1353 | the next check-in. But it is usually wiser to commit the merged |
| 1342 | revision, then lock it and make the further changes. This will keep | 1354 | revision, then lock it and make the further changes. This will keep |
| 1343 | a better record of the history of changes. | 1355 | a better record of the history of changes. |
| 1344 | 1356 | ||
| @@ -1374,7 +1386,7 @@ master file revision with user B's changes in it is 1.11. | |||
| 1374 | Then you can resolve the conflicts by editing the file manually. Or | 1386 | Then you can resolve the conflicts by editing the file manually. Or |
| 1375 | you can type @code{M-x vc-resolve-conflicts} after visiting the file. | 1387 | you can type @code{M-x vc-resolve-conflicts} after visiting the file. |
| 1376 | This starts an Ediff session, as described above. Don't forget to | 1388 | This starts an Ediff session, as described above. Don't forget to |
| 1377 | check in the merged version afterwards. | 1389 | commit the merged version afterwards. |
| 1378 | 1390 | ||
| 1379 | @node Multi-User Branching | 1391 | @node Multi-User Branching |
| 1380 | @subsubsection Multi-User Branching | 1392 | @subsubsection Multi-User Branching |
diff --git a/doc/emacs/vc1-xtra.texi b/doc/emacs/vc1-xtra.texi index 5095c3f4764..04d37719013 100644 --- a/doc/emacs/vc1-xtra.texi +++ b/doc/emacs/vc1-xtra.texi | |||
| @@ -594,7 +594,7 @@ headers. | |||
| 594 | @vindex vc-handled-backends | 594 | @vindex vc-handled-backends |
| 595 | The variable @code{vc-handled-backends} determines which version | 595 | The variable @code{vc-handled-backends} determines which version |
| 596 | control systems VC should handle. The default value is @code{(RCS CVS | 596 | control systems VC should handle. The default value is @code{(RCS CVS |
| 597 | SVN SCCS BZR GIT HG Arch)}, so it contains all the version systems | 597 | SVN SCCS Bzr Git Hg Mtn Arch)}, so it contains all the version systems |
| 598 | that are currently supported. If you want VC to ignore one or more of | 598 | that are currently supported. If you want VC to ignore one or more of |
| 599 | these systems, exclude its name from the list. To disable VC entirely, | 599 | these systems, exclude its name from the list. To disable VC entirely, |
| 600 | set this variable to @code{nil}. | 600 | set this variable to @code{nil}. |
| @@ -657,8 +657,8 @@ variable does not affect @kbd{C-x v c}; that operation is so drastic | |||
| 657 | that it should always ask for confirmation.) | 657 | that it should always ask for confirmation.) |
| 658 | 658 | ||
| 659 | @vindex vc-command-messages | 659 | @vindex vc-command-messages |
| 660 | VC mode does much of its work by running the shell commands for RCS, | 660 | VC mode does much of its work by running the shell commands for the |
| 661 | CVS and SCCS. If @code{vc-command-messages} is non-@code{nil}, VC | 661 | appropriate backend. If @code{vc-command-messages} is non-@code{nil}, VC |
| 662 | displays messages to indicate which shell commands it runs, and | 662 | displays messages to indicate which shell commands it runs, and |
| 663 | additional messages when the commands finish. | 663 | additional messages when the commands finish. |
| 664 | 664 | ||
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index d1c2d861eb7..c6d851f55ec 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,33 @@ | |||
| 1 | 2010-11-27 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * nonascii.texi (Converting Representations): Document | ||
| 4 | byte-to-string. | ||
| 5 | |||
| 6 | * strings.texi (Creating Strings): Don't mention semi-obsolete | ||
| 7 | function char-to-string. | ||
| 8 | (String Conversion): Shorten discussion of semi-obsolete function | ||
| 9 | string-to-char. Link to Converting Representations. | ||
| 10 | |||
| 11 | * objects.texi (Symbol Type): | ||
| 12 | * text.texi (Near Point): | ||
| 13 | * help.texi (Help Functions): | ||
| 14 | * functions.texi (Mapping Functions): Use string instead of | ||
| 15 | char-to-string in examples. | ||
| 16 | |||
| 17 | 2010-11-27 Chong Yidong <cyd@stupidchicken.com> | ||
| 18 | |||
| 19 | * text.texi (Kill Functions, Kill Functions) | ||
| 20 | (Low-Level Kill Ring, Low-Level Kill Ring): Remove obsolete | ||
| 21 | YANK-HANDLER args. | ||
| 22 | |||
| 23 | * symbols.texi (Creating Symbols): Using unintern without an | ||
| 24 | obarray arg is now obsolete. | ||
| 25 | |||
| 26 | * numbers.texi (Float Basics): Document float-e and float-pi. | ||
| 27 | |||
| 28 | * variables.texi (Defining Variables): Change "pi" example to | ||
| 29 | "float-pi". | ||
| 30 | |||
| 1 | 2010-11-26 Eli Zaretskii <eliz@gnu.org> | 31 | 2010-11-26 Eli Zaretskii <eliz@gnu.org> |
| 2 | 32 | ||
| 3 | * commands.texi (Click Events): Document the values of X, Y and | 33 | * commands.texi (Click Events): Document the values of X, Y and |
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index 6f3fd63013c..635245426fb 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi | |||
| @@ -818,7 +818,7 @@ length of @var{sequence}. For example: | |||
| 818 | @result{} (a c e) | 818 | @result{} (a c e) |
| 819 | (mapcar '1+ [1 2 3]) | 819 | (mapcar '1+ [1 2 3]) |
| 820 | @result{} (2 3 4) | 820 | @result{} (2 3 4) |
| 821 | (mapcar 'char-to-string "abc") | 821 | (mapcar 'string "abc") |
| 822 | @result{} ("a" "b" "c") | 822 | @result{} ("a" "b" "c") |
| 823 | @end group | 823 | @end group |
| 824 | 824 | ||
diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi index d3e289578c0..f21e16e104a 100644 --- a/doc/lispref/help.texi +++ b/doc/lispref/help.texi | |||
| @@ -546,7 +546,7 @@ follows: | |||
| 546 | 546 | ||
| 547 | @smallexample | 547 | @smallexample |
| 548 | @group | 548 | @group |
| 549 | (define-key global-map (char-to-string help-char) 'help-command) | 549 | (define-key global-map (string help-char) 'help-command) |
| 550 | (fset 'help-command help-map) | 550 | (fset 'help-command help-map) |
| 551 | @end group | 551 | @end group |
| 552 | @end smallexample | 552 | @end smallexample |
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index 40c78d97da7..1c196c93f27 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi | |||
| @@ -199,6 +199,13 @@ unibyte string, it is returned unchanged. Use this function for | |||
| 199 | characters. | 199 | characters. |
| 200 | @end defun | 200 | @end defun |
| 201 | 201 | ||
| 202 | @defun byte-to-string byte | ||
| 203 | @cindex byte to string | ||
| 204 | This function returns a unibyte string containing a single byte of | ||
| 205 | character data, @var{character}. It signals a error if | ||
| 206 | @var{character} is not an integer between 0 and 255. | ||
| 207 | @end defun | ||
| 208 | |||
| 202 | @defun multibyte-char-to-unibyte char | 209 | @defun multibyte-char-to-unibyte char |
| 203 | This converts the multibyte character @var{char} to a unibyte | 210 | This converts the multibyte character @var{char} to a unibyte |
| 204 | character, and returns that character. If @var{char} is neither | 211 | character, and returns that character. If @var{char} is neither |
diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi index 62b4796350e..e83da348e05 100644 --- a/doc/lispref/numbers.texi +++ b/doc/lispref/numbers.texi | |||
| @@ -224,6 +224,14 @@ down to an integer. | |||
| 224 | @end example | 224 | @end example |
| 225 | @end defun | 225 | @end defun |
| 226 | 226 | ||
| 227 | @defvar float-e | ||
| 228 | The mathematical constant @math{e} (2.71828@dots{}). | ||
| 229 | @end defvar | ||
| 230 | |||
| 231 | @defvar float-pi | ||
| 232 | The mathematical constant @math{pi} (3.14159@dots{}). | ||
| 233 | @end defvar | ||
| 234 | |||
| 227 | @node Predicates on Numbers | 235 | @node Predicates on Numbers |
| 228 | @section Type Predicates for Numbers | 236 | @section Type Predicates for Numbers |
| 229 | @cindex predicates for numbers | 237 | @cindex predicates for numbers |
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi index c8ccb15a2d3..8f72cc01680 100644 --- a/doc/lispref/objects.texi +++ b/doc/lispref/objects.texi | |||
| @@ -582,7 +582,6 @@ makes it invalid as a number. | |||
| 582 | @group | 582 | @group |
| 583 | foo ; @r{A symbol named @samp{foo}.} | 583 | foo ; @r{A symbol named @samp{foo}.} |
| 584 | FOO ; @r{A symbol named @samp{FOO}, different from @samp{foo}.} | 584 | FOO ; @r{A symbol named @samp{FOO}, different from @samp{foo}.} |
| 585 | char-to-string ; @r{A symbol named @samp{char-to-string}.} | ||
| 586 | @end group | 585 | @end group |
| 587 | @group | 586 | @group |
| 588 | 1+ ; @r{A symbol named @samp{1+}} | 587 | 1+ ; @r{A symbol named @samp{1+}} |
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 1128ca87d8a..94d2765a833 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi | |||
| @@ -126,9 +126,8 @@ This function returns a string made up of @var{count} repetitions of | |||
| 126 | @result{} "" | 126 | @result{} "" |
| 127 | @end example | 127 | @end example |
| 128 | 128 | ||
| 129 | Other functions to compare with this one include @code{char-to-string} | 129 | Other functions to compare with this one include @code{make-vector} |
| 130 | (@pxref{String Conversion}), @code{make-vector} (@pxref{Vectors}), and | 130 | (@pxref{Vectors}) and @code{make-list} (@pxref{Building Lists}). |
| 131 | @code{make-list} (@pxref{Building Lists}). | ||
| 132 | @end defun | 131 | @end defun |
| 133 | 132 | ||
| 134 | @defun string &rest characters | 133 | @defun string &rest characters |
| @@ -565,38 +564,6 @@ of text characters and general input events | |||
| 565 | (@code{single-key-description} and @code{text-char-description}). These | 564 | (@code{single-key-description} and @code{text-char-description}). These |
| 566 | are used primarily for making help messages. | 565 | are used primarily for making help messages. |
| 567 | 566 | ||
| 568 | @defun char-to-string character | ||
| 569 | @cindex character to string | ||
| 570 | This function returns a new string containing one character, | ||
| 571 | @var{character}. This function is semi-obsolete because the function | ||
| 572 | @code{string} is more general. @xref{Creating Strings}. | ||
| 573 | @end defun | ||
| 574 | |||
| 575 | @defun string-to-char string | ||
| 576 | @cindex string to character | ||
| 577 | This function returns the first character in @var{string}. If the | ||
| 578 | string is empty, the function returns 0. The value is also 0 when the | ||
| 579 | first character of @var{string} is the null character, @acronym{ASCII} code | ||
| 580 | 0. | ||
| 581 | |||
| 582 | @example | ||
| 583 | (string-to-char "ABC") | ||
| 584 | @result{} 65 | ||
| 585 | |||
| 586 | (string-to-char "xyz") | ||
| 587 | @result{} 120 | ||
| 588 | (string-to-char "") | ||
| 589 | @result{} 0 | ||
| 590 | @group | ||
| 591 | (string-to-char "\000") | ||
| 592 | @result{} 0 | ||
| 593 | @end group | ||
| 594 | @end example | ||
| 595 | |||
| 596 | This function may be eliminated in the future if it does not seem useful | ||
| 597 | enough to retain. | ||
| 598 | @end defun | ||
| 599 | |||
| 600 | @defun number-to-string number | 567 | @defun number-to-string number |
| 601 | @cindex integer to string | 568 | @cindex integer to string |
| 602 | @cindex integer to decimal | 569 | @cindex integer to decimal |
| @@ -659,19 +626,39 @@ this function returns 0. | |||
| 659 | @code{string-to-int} is an obsolete alias for this function. | 626 | @code{string-to-int} is an obsolete alias for this function. |
| 660 | @end defun | 627 | @end defun |
| 661 | 628 | ||
| 629 | @defun char-to-string character | ||
| 630 | @cindex character to string | ||
| 631 | This function returns a new string containing one character, | ||
| 632 | @var{character}. This function is semi-obsolete because the function | ||
| 633 | @code{string} is more general. @xref{Creating Strings}. | ||
| 634 | @end defun | ||
| 635 | |||
| 636 | @defun string-to-char string | ||
| 637 | This function returns the first character in @var{string}. This | ||
| 638 | mostly identical to @code{(aref string 0)}, except that it returns 0 | ||
| 639 | if the string is empty. (The value is also 0 when the first character | ||
| 640 | of @var{string} is the null character, @acronym{ASCII} code 0.) This | ||
| 641 | function may be eliminated in the future if it does not seem useful | ||
| 642 | enough to retain. | ||
| 643 | @end defun | ||
| 644 | |||
| 662 | Here are some other functions that can convert to or from a string: | 645 | Here are some other functions that can convert to or from a string: |
| 663 | 646 | ||
| 664 | @table @code | 647 | @table @code |
| 665 | @item concat | 648 | @item concat |
| 666 | @code{concat} can convert a vector or a list into a string. | 649 | This function converts a vector or a list into a string. |
| 667 | @xref{Creating Strings}. | 650 | @xref{Creating Strings}. |
| 668 | 651 | ||
| 669 | @item vconcat | 652 | @item vconcat |
| 670 | @code{vconcat} can convert a string into a vector. @xref{Vector | 653 | This function converts a string into a vector. @xref{Vector |
| 671 | Functions}. | 654 | Functions}. |
| 672 | 655 | ||
| 673 | @item append | 656 | @item append |
| 674 | @code{append} can convert a string into a list. @xref{Building Lists}. | 657 | This function converts a string into a list. @xref{Building Lists}. |
| 658 | |||
| 659 | @item byte-to-string | ||
| 660 | This function converts a byte of character data into a unibyte string. | ||
| 661 | @xref{Converting Representations}. | ||
| 675 | @end table | 662 | @end table |
| 676 | 663 | ||
| 677 | @node Formatting Strings | 664 | @node Formatting Strings |
diff --git a/doc/lispref/symbols.texi b/doc/lispref/symbols.texi index 5bb44ff9675..ccf90e33cd0 100644 --- a/doc/lispref/symbols.texi +++ b/doc/lispref/symbols.texi | |||
| @@ -383,7 +383,7 @@ See @code{documentation} in @ref{Accessing Documentation}, for another | |||
| 383 | example using @code{mapatoms}. | 383 | example using @code{mapatoms}. |
| 384 | @end defun | 384 | @end defun |
| 385 | 385 | ||
| 386 | @defun unintern symbol &optional obarray | 386 | @defun unintern symbol obarray |
| 387 | This function deletes @var{symbol} from the obarray @var{obarray}. If | 387 | This function deletes @var{symbol} from the obarray @var{obarray}. If |
| 388 | @code{symbol} is not actually in the obarray, @code{unintern} does | 388 | @code{symbol} is not actually in the obarray, @code{unintern} does |
| 389 | nothing. If @var{obarray} is @code{nil}, the current obarray is used. | 389 | nothing. If @var{obarray} is @code{nil}, the current obarray is used. |
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index b6723a0bee4..45d358366de 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi | |||
| @@ -87,7 +87,7 @@ buffer is @samp{@@}: | |||
| 87 | 87 | ||
| 88 | @example | 88 | @example |
| 89 | @group | 89 | @group |
| 90 | (char-to-string (char-after 1)) | 90 | (string (char-after 1)) |
| 91 | @result{} "@@" | 91 | @result{} "@@" |
| 92 | @end group | 92 | @end group |
| 93 | @end example | 93 | @end example |
| @@ -122,9 +122,9 @@ but there is no peace. | |||
| 122 | @end group | 122 | @end group |
| 123 | 123 | ||
| 124 | @group | 124 | @group |
| 125 | (char-to-string (preceding-char)) | 125 | (string (preceding-char)) |
| 126 | @result{} "a" | 126 | @result{} "a" |
| 127 | (char-to-string (following-char)) | 127 | (string (following-char)) |
| 128 | @result{} "c" | 128 | @result{} "c" |
| 129 | @end group | 129 | @end group |
| 130 | @end example | 130 | @end example |
| @@ -866,7 +866,7 @@ adds it to the most recent element. It determines automatically (using | |||
| 866 | @code{last-command}) whether the previous command was a kill command, | 866 | @code{last-command}) whether the previous command was a kill command, |
| 867 | and if so appends the killed text to the most recent entry. | 867 | and if so appends the killed text to the most recent entry. |
| 868 | 868 | ||
| 869 | @deffn Command kill-region start end &optional yank-handler | 869 | @deffn Command kill-region start end |
| 870 | This function kills the text in the region defined by @var{start} and | 870 | This function kills the text in the region defined by @var{start} and |
| 871 | @var{end}. The text is deleted but saved in the kill ring, along with | 871 | @var{end}. The text is deleted but saved in the kill ring, along with |
| 872 | its text properties. The value is always @code{nil}. | 872 | its text properties. The value is always @code{nil}. |
| @@ -874,17 +874,10 @@ its text properties. The value is always @code{nil}. | |||
| 874 | In an interactive call, @var{start} and @var{end} are point and | 874 | In an interactive call, @var{start} and @var{end} are point and |
| 875 | the mark. | 875 | the mark. |
| 876 | 876 | ||
| 877 | @c Emacs 19 feature | ||
| 878 | If the buffer or text is read-only, @code{kill-region} modifies the kill | 877 | If the buffer or text is read-only, @code{kill-region} modifies the kill |
| 879 | ring just the same, then signals an error without modifying the buffer. | 878 | ring just the same, then signals an error without modifying the buffer. |
| 880 | This is convenient because it lets the user use a series of kill | 879 | This is convenient because it lets the user use a series of kill |
| 881 | commands to copy text from a read-only buffer into the kill ring. | 880 | commands to copy text from a read-only buffer into the kill ring. |
| 882 | |||
| 883 | If @var{yank-handler} is non-@code{nil}, this puts that value onto | ||
| 884 | the string of killed text, as a @code{yank-handler} text property. | ||
| 885 | @xref{Yanking}. Note that if @var{yank-handler} is @code{nil}, any | ||
| 886 | @code{yank-handler} properties present on the killed text are copied | ||
| 887 | onto the kill ring, like other text properties. | ||
| 888 | @end deffn | 881 | @end deffn |
| 889 | 882 | ||
| 890 | @defopt kill-read-only-ok | 883 | @defopt kill-read-only-ok |
| @@ -1069,7 +1062,7 @@ it returns the entry pointed at by the yanking pointer and does not | |||
| 1069 | move the yanking pointer. | 1062 | move the yanking pointer. |
| 1070 | @end defun | 1063 | @end defun |
| 1071 | 1064 | ||
| 1072 | @defun kill-new string &optional replace yank-handler | 1065 | @defun kill-new string &optional replace |
| 1073 | This function pushes the text @var{string} onto the kill ring and | 1066 | This function pushes the text @var{string} onto the kill ring and |
| 1074 | makes the yanking pointer point to it. It discards the oldest entry | 1067 | makes the yanking pointer point to it. It discards the oldest entry |
| 1075 | if appropriate. It also invokes the value of | 1068 | if appropriate. It also invokes the value of |
| @@ -1078,25 +1071,15 @@ if appropriate. It also invokes the value of | |||
| 1078 | If @var{replace} is non-@code{nil}, then @code{kill-new} replaces the | 1071 | If @var{replace} is non-@code{nil}, then @code{kill-new} replaces the |
| 1079 | first element of the kill ring with @var{string}, rather than pushing | 1072 | first element of the kill ring with @var{string}, rather than pushing |
| 1080 | @var{string} onto the kill ring. | 1073 | @var{string} onto the kill ring. |
| 1081 | |||
| 1082 | If @var{yank-handler} is non-@code{nil}, this puts that value onto | ||
| 1083 | the string of killed text, as a @code{yank-handler} property. | ||
| 1084 | @xref{Yanking}. Note that if @var{yank-handler} is @code{nil}, then | ||
| 1085 | @code{kill-new} copies any @code{yank-handler} properties present on | ||
| 1086 | @var{string} onto the kill ring, as it does with other text properties. | ||
| 1087 | @end defun | 1074 | @end defun |
| 1088 | 1075 | ||
| 1089 | @defun kill-append string before-p &optional yank-handler | 1076 | @defun kill-append string before-p |
| 1090 | This function appends the text @var{string} to the first entry in the | 1077 | This function appends the text @var{string} to the first entry in the |
| 1091 | kill ring and makes the yanking pointer point to the combined entry. | 1078 | kill ring and makes the yanking pointer point to the combined entry. |
| 1092 | Normally @var{string} goes at the end of the entry, but if | 1079 | Normally @var{string} goes at the end of the entry, but if |
| 1093 | @var{before-p} is non-@code{nil}, it goes at the beginning. This | 1080 | @var{before-p} is non-@code{nil}, it goes at the beginning. This |
| 1094 | function also invokes the value of @code{interprogram-cut-function} | 1081 | function also invokes the value of @code{interprogram-cut-function} |
| 1095 | (see below). This handles @var{yank-handler} just like | 1082 | (see below). |
| 1096 | @code{kill-new}, except that if @var{yank-handler} is different from | ||
| 1097 | the @code{yank-handler} property of the first entry of the kill ring, | ||
| 1098 | @code{kill-append} pushes the concatenated string onto the kill ring, | ||
| 1099 | instead of replacing the original first entry with it. | ||
| 1100 | @end defun | 1083 | @end defun |
| 1101 | 1084 | ||
| 1102 | @defvar interprogram-paste-function | 1085 | @defvar interprogram-paste-function |
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index a3a550868f5..20fe4dbc9fa 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi | |||
| @@ -544,21 +544,23 @@ not the buffer-local value. (But you should not be making | |||
| 544 | buffer-local bindings for a symbol that is defined with | 544 | buffer-local bindings for a symbol that is defined with |
| 545 | @code{defconst}.) | 545 | @code{defconst}.) |
| 546 | 546 | ||
| 547 | Here, @code{pi} is a constant that presumably ought not to be changed | 547 | An example of the use of @code{defconst} is Emacs' definition of |
| 548 | by anyone (attempts by the Indiana State Legislature notwithstanding). | 548 | @code{float-pi}---the mathematical constant @math{pi}, which ought not |
| 549 | As the second form illustrates, however, this is only advisory. | 549 | to be changed by anyone (attempts by the Indiana State Legislature |
| 550 | notwithstanding). As the second form illustrates, however, | ||
| 551 | @code{defconst} is only advisory. | ||
| 550 | 552 | ||
| 551 | @example | 553 | @example |
| 552 | @group | 554 | @group |
| 553 | (defconst pi 3.1415 "Pi to five places.") | 555 | (defconst float-pi 3.141592653589793 "The value of Pi.") |
| 554 | @result{} pi | 556 | @result{} float-pi |
| 555 | @end group | 557 | @end group |
| 556 | @group | 558 | @group |
| 557 | (setq pi 3) | 559 | (setq float-pi 3) |
| 558 | @result{} pi | 560 | @result{} float-pi |
| 559 | @end group | 561 | @end group |
| 560 | @group | 562 | @group |
| 561 | pi | 563 | float-pi |
| 562 | @result{} 3 | 564 | @result{} 3 |
| 563 | @end group | 565 | @end group |
| 564 | @end example | 566 | @end example |
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 38671f1410c..91ac5f74b0e 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-11-27 Glenn Morris <rgm@gnu.org> | ||
| 2 | James Clark <none@example.com> | ||
| 3 | |||
| 4 | * nxml-mode.texi (Introduction): New section. | ||
| 5 | |||
| 1 | 2010-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org> | 6 | 2010-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 7 | ||
| 3 | * gnus.texi (Server Commands): Document gnus-server-show-server. | 8 | * gnus.texi (Server Commands): Document gnus-server-show-server. |
diff --git a/doc/misc/nxml-mode.texi b/doc/misc/nxml-mode.texi index 423bdc85a24..d076f0dd820 100644 --- a/doc/misc/nxml-mode.texi +++ b/doc/misc/nxml-mode.texi | |||
| @@ -8,7 +8,8 @@ | |||
| 8 | This manual documents nxml-mode, an Emacs major mode for editing | 8 | This manual documents nxml-mode, an Emacs major mode for editing |
| 9 | XML with RELAX NG support. | 9 | XML with RELAX NG support. |
| 10 | 10 | ||
| 11 | Copyright @copyright{} 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | 11 | Copyright @copyright{} 2007, 2008, 2009, 2010 |
| 12 | Free Software Foundation, Inc. | ||
| 12 | 13 | ||
| 13 | @quotation | 14 | @quotation |
| 14 | Permission is granted to copy, distribute and/or modify this document | 15 | Permission is granted to copy, distribute and/or modify this document |
| @@ -43,6 +44,7 @@ license to the document, as described in section 6 of the license. | |||
| 43 | This manual is not yet complete. | 44 | This manual is not yet complete. |
| 44 | 45 | ||
| 45 | @menu | 46 | @menu |
| 47 | * Introduction:: | ||
| 46 | * Completion:: | 48 | * Completion:: |
| 47 | * Inserting end-tags:: | 49 | * Inserting end-tags:: |
| 48 | * Paragraphs:: | 50 | * Paragraphs:: |
| @@ -52,6 +54,58 @@ This manual is not yet complete. | |||
| 52 | * Limitations:: | 54 | * Limitations:: |
| 53 | @end menu | 55 | @end menu |
| 54 | 56 | ||
| 57 | @node Introduction | ||
| 58 | @chapter Introduction | ||
| 59 | |||
| 60 | nXML mode is an Emacs major-mode for editing XML documents. It supports | ||
| 61 | editing well-formed XML documents, and provides schema-sensitive editing | ||
| 62 | using RELAX NG Compact Syntax. To get started, visit a file containing an | ||
| 63 | XML document, and, if necessary, use @kbd{M-x nxml-mode} to switch to nXML | ||
| 64 | mode. By default, @code{auto-mode-alist} and @code{magic-fallback-alist} | ||
| 65 | put buffers in nXML mode if they have recognizable XML content or file | ||
| 66 | extensions. You may wish to customize the settings, for example to | ||
| 67 | recognize different file extensions. | ||
| 68 | |||
| 69 | Once in nXML mode, you can type @kbd{C-h m} for basic information on the | ||
| 70 | mode. | ||
| 71 | |||
| 72 | The @file{etc/nxml} directory in the Emacs distribution contains some data | ||
| 73 | files used by nXML mode, and includes two files (@file{test.valid.xml} and | ||
| 74 | @file{test.invalid.xml}) that provide examples of valid and invalid XML | ||
| 75 | documents. | ||
| 76 | |||
| 77 | To get validation and schema-sensitive editing, you need a RELAX NG Compact | ||
| 78 | Syntax (RNC) schema for your document (@pxref{Locating a schema}). The | ||
| 79 | @file{etc/schema} directory includes some schemas for popular document | ||
| 80 | types. See @url{http://relaxng.org/} for more information on RELAX NG. | ||
| 81 | You can use the @samp{Trang} program from | ||
| 82 | @url{http://www.thaiopensource.com/relaxng/trang.html} to | ||
| 83 | automatically create RNC schemas. This program can: | ||
| 84 | |||
| 85 | @itemize @bullet | ||
| 86 | @item | ||
| 87 | infer an RNC schema from an instance document; | ||
| 88 | @item | ||
| 89 | convert a DTD to an RNC schema; | ||
| 90 | @item | ||
| 91 | convert a RELAX NG XML syntax schema to an RNC schema. | ||
| 92 | @end itemize | ||
| 93 | |||
| 94 | @noindent To convert a RELAX NG XML syntax (@samp{.rng}) schema to a RNC | ||
| 95 | one, you can also use the XSLT stylesheet from | ||
| 96 | @url{http://www.pantor.com/download.html}. | ||
| 97 | |||
| 98 | To convert a W3C XML Schema to an RNC schema, you need first to convert it | ||
| 99 | to RELAX NG XML syntax using the RELAX NG converter tool @code{rngconv} | ||
| 100 | (built on top of MSV). See @url{https://github.com/kohsuke/msv} | ||
| 101 | and @url{https://msv.dev.java.net/}. | ||
| 102 | |||
| 103 | For historical discussions only, see the mailing list archives at | ||
| 104 | @url{http://groups.yahoo.com/group/emacs-nxml-mode/}. Please make all new | ||
| 105 | discussions on the @samp{help-gnu-emacs} and @samp{emacs-devel} mailing | ||
| 106 | lists. Report any bugs with @kbd{M-x report-emacs-bug}. | ||
| 107 | |||
| 108 | |||
| 55 | @node Completion | 109 | @node Completion |
| 56 | @chapter Completion | 110 | @chapter Completion |
| 57 | 111 | ||
| @@ -855,6 +909,3 @@ specification are not enforced. | |||
| 855 | 909 | ||
| 856 | @bye | 910 | @bye |
| 857 | 911 | ||
| 858 | @ignore | ||
| 859 | arch-tag: 3b6e8ac2-ae8d-4f38-bd43-ce9f80be04d6 | ||
| 860 | @end ignore | ||