diff options
| author | Chong Yidong | 2011-12-22 18:14:41 +0800 |
|---|---|---|
| committer | Chong Yidong | 2011-12-22 18:14:41 +0800 |
| commit | 2785d02431f6f90b5013e490f9ad5c21dd51f6de (patch) | |
| tree | 8266544591d5c9e552db9df49041aec3b29bce10 /doc | |
| parent | 0ab393996c1c1345b2f969e987329e5e4010ddda (diff) | |
| download | emacs-2785d02431f6f90b5013e490f9ad5c21dd51f6de.tar.gz emacs-2785d02431f6f90b5013e490f9ad5c21dd51f6de.zip | |
More updates for VC documentation.
* doc/emacs/vc1-xtra.texi (Version Headers): Note that these are for
Subversion, CVS, etc. only.
(General VC Options): De-document vc-keep-workfiles. Fix RCS-isms.
* doc/emacs/maintaining.texi (Change Log Commands): Don't specially mention
vc-update-change-log which is CVS-only.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/ChangeLog | 10 | ||||
| -rw-r--r-- | doc/emacs/building.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/maintaining.texi | 24 | ||||
| -rw-r--r-- | doc/emacs/vc1-xtra.texi | 167 |
4 files changed, 65 insertions, 138 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 6cf181199c5..0621fa4e003 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2011-12-22 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * maintaining.texi (Change Log Commands): Don't specially mention | ||
| 4 | vc-update-change-log which is CVS-only. | ||
| 5 | |||
| 6 | * vc1-xtra.texi (Version Headers): Note that these are for | ||
| 7 | Subversion, CVS, etc. only. | ||
| 8 | (General VC Options): De-document vc-keep-workfiles. Fix | ||
| 9 | RCS-isms. | ||
| 10 | |||
| 1 | 2011-12-22 Eli Zaretskii <eliz@gnu.org> | 11 | 2011-12-22 Eli Zaretskii <eliz@gnu.org> |
| 2 | 12 | ||
| 3 | * building.texi (Debugger Operation): Fix a typo: "@end iftext" | 13 | * building.texi (Debugger Operation): Fix a typo: "@end iftext" |
diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index 880335830bd..963bd510f67 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi | |||
| @@ -565,7 +565,7 @@ Mode}). Completion is available for most debugger commands | |||
| 565 | commands to repeat them. | 565 | commands to repeat them. |
| 566 | @iftex | 566 | @iftex |
| 567 | See the next section | 567 | See the next section |
| 568 | @end iftext | 568 | @end iftex |
| 569 | @ifnottex | 569 | @ifnottex |
| 570 | @xref{Commands of GUD}, | 570 | @xref{Commands of GUD}, |
| 571 | @end ifnottex | 571 | @end ifnottex |
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 488bdf87320..68a34ca3a77 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi | |||
| @@ -1438,13 +1438,11 @@ different revision with @kbd{C-u C-x v v}. | |||
| 1438 | @section Change Logs | 1438 | @section Change Logs |
| 1439 | 1439 | ||
| 1440 | @cindex change log | 1440 | @cindex change log |
| 1441 | A change log file contains a chronological record of when and why you | 1441 | Many software projects keep a @dfn{change log}. This is a file, |
| 1442 | have changed a program, consisting of a sequence of entries describing | 1442 | normally named @file{ChangeLog}, containing a chronological record of |
| 1443 | individual changes. Normally it is kept in a file called | 1443 | when and how the program was changed. Sometimes, there are several |
| 1444 | @file{ChangeLog} in the same directory as the file you are editing, or | 1444 | change log files, each recording the changes in one directory or |
| 1445 | one of its parent directories. A single @file{ChangeLog} file can | 1445 | directory tree. |
| 1446 | record changes for all the files in its directory and all its | ||
| 1447 | subdirectories. | ||
| 1448 | 1446 | ||
| 1449 | @menu | 1447 | @menu |
| 1450 | * Change Log Commands:: Commands for editing change log files. | 1448 | * Change Log Commands:: Commands for editing change log files. |
| @@ -1476,7 +1474,7 @@ rather than starting a new item. | |||
| 1476 | 1474 | ||
| 1477 | You can combine multiple changes of the same nature. If you don't | 1475 | You can combine multiple changes of the same nature. If you don't |
| 1478 | enter any text after the initial @kbd{C-x 4 a}, any subsequent | 1476 | enter any text after the initial @kbd{C-x 4 a}, any subsequent |
| 1479 | @kbd{C-x 4 a} adds another symbol to the change. | 1477 | @kbd{C-x 4 a} adds another symbol to the change log entry. |
| 1480 | 1478 | ||
| 1481 | @vindex add-log-always-start-new-record | 1479 | @vindex add-log-always-start-new-record |
| 1482 | If @code{add-log-always-start-new-record} is non-@code{nil}, | 1480 | If @code{add-log-always-start-new-record} is non-@code{nil}, |
| @@ -1514,15 +1512,7 @@ ordering of entries. | |||
| 1514 | Version control systems are another way to keep track of changes in | 1512 | Version control systems are another way to keep track of changes in |
| 1515 | your program and keep a change log. In the VC log buffer, typing | 1513 | your program and keep a change log. In the VC log buffer, typing |
| 1516 | @kbd{C-c C-a} (@code{log-edit-insert-changelog}) inserts the relevant | 1514 | @kbd{C-c C-a} (@code{log-edit-insert-changelog}) inserts the relevant |
| 1517 | Change Log entry, if one exists (@pxref{Log Buffer}). You can also | 1515 | Change Log entry, if one exists. @xref{Log Buffer}. |
| 1518 | insert a VC log entry into a Change Log buffer by typing @kbd{C-x v a} | ||
| 1519 | (@code{vc-update-change-log}) in the Change Log buffer | ||
| 1520 | @iftex | ||
| 1521 | (@pxref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features}). | ||
| 1522 | @end iftex | ||
| 1523 | @ifnottex | ||
| 1524 | (@pxref{Change Logs and VC}). | ||
| 1525 | @end ifnottex | ||
| 1526 | 1516 | ||
| 1527 | @node Format of ChangeLog | 1517 | @node Format of ChangeLog |
| 1528 | @subsection Format of ChangeLog | 1518 | @subsection Format of ChangeLog |
diff --git a/doc/emacs/vc1-xtra.texi b/doc/emacs/vc1-xtra.texi index 700003db58a..8df5bfbd551 100644 --- a/doc/emacs/vc1-xtra.texi +++ b/doc/emacs/vc1-xtra.texi | |||
| @@ -204,123 +204,63 @@ So the program won't really work as retrieved. | |||
| 204 | @node Version Headers | 204 | @node Version Headers |
| 205 | @subsubsection Inserting Version Control Headers | 205 | @subsubsection Inserting Version Control Headers |
| 206 | 206 | ||
| 207 | Sometimes it is convenient to put version identification strings | 207 | On Subversion, CVS, RCS, and SCCS, you can put certain special |
| 208 | directly into working files. Certain special strings called | 208 | strings called @dfn{version headers} into a work file. When the file |
| 209 | @dfn{version headers} are replaced in each successive version by the | 209 | is committed, the version control system automatically puts the |
| 210 | number of that version, the name of the user who created it, and other | 210 | revision number, the name of the user who made the commit, and other |
| 211 | relevant information. All of the back ends that VC supports have such | 211 | relevant information into the version header. |
| 212 | a mechanism, except GNU Arch. | 212 | |
| 213 | 213 | @vindex vc-consult-headers | |
| 214 | VC does not normally use the information contained in these headers. | 214 | VC does not normally use the information in the version headers. As |
| 215 | The exception is RCS---with RCS, version headers are sometimes more | 215 | an exception, when using RCS, Emacs uses the version header, if there |
| 216 | reliable than the master file to determine which version of the file | 216 | is one, to determine the file version, since it is often more reliable |
| 217 | you are editing. | 217 | than the RCS master file. To inhibit using the version header this |
| 218 | 218 | way, change the variable @code{vc-consult-headers} to @code{nil}. | |
| 219 | Searching for RCS version headers is controlled by the variable | ||
| 220 | @code{vc-consult-headers}. If it is non-@code{nil} (the default), | ||
| 221 | Emacs searches for headers to determine the version number you are | ||
| 222 | editing. Setting it to @code{nil} disables this feature. | ||
| 223 | |||
| 224 | Note that although CVS uses the same kind of version headers as RCS | ||
| 225 | does, VC never searches for these headers if you are using CVS, | ||
| 226 | regardless of the above setting. | ||
| 227 | 219 | ||
| 228 | @kindex C-x v h | 220 | @kindex C-x v h |
| 229 | @findex vc-insert-headers | 221 | @findex vc-insert-headers |
| 230 | You can use the @kbd{C-x v h} command (@code{vc-insert-headers}) to | ||
| 231 | insert a suitable header string. | ||
| 232 | |||
| 233 | @table @kbd | ||
| 234 | @item C-x v h | ||
| 235 | Insert headers in a file for use with your version-control system. | ||
| 236 | @end table | ||
| 237 | |||
| 238 | @vindex vc-@var{backend}-header | 222 | @vindex vc-@var{backend}-header |
| 239 | The default header string is @samp{@w{$}Id$} for RCS and | 223 | To insert a suitable header string into the current buffer, type |
| 240 | @samp{@w{%}W%} for SCCS. You can specify other headers to insert by | 224 | @kbd{C-x v h} (@code{vc-insert-headers}). This command works only on |
| 241 | setting the variables @code{vc-@var{backend}-header} where | 225 | Subversion, CVS, RCS, and SCCS. The variable |
| 242 | @var{backend} is @code{rcs} or @code{sccs}. | 226 | @code{vc-@var{backend}-header} contains the list of keywords to insert |
| 243 | 227 | into the version header; for instance, CVS uses @code{vc-cvs-header}, | |
| 244 | Instead of a single string, you can specify a list of strings; then | 228 | whose default value is @code{'("\$Id\$")}. (The extra backslashes |
| 245 | each string in the list is inserted as a separate header on a line of | 229 | prevent the string constant from being interpreted as a header, if the |
| 246 | its own. | 230 | Emacs Lisp file defining it is maintained with version control.) The |
| 247 | 231 | @kbd{C-x v h} command inserts each keyword in the list on a new line | |
| 248 | It may be necessary to use apparently-superfluous backslashes when | 232 | at point, surrounded by tabs, and inside comment delimiters if |
| 249 | writing the strings that you put in this variable. For instance, you | 233 | necessary. |
| 250 | might write @code{"$Id\$"} rather than @code{"$Id@w{$}"}. The extra | ||
| 251 | backslash prevents the string constant from being interpreted as a | ||
| 252 | header, if the Emacs Lisp file containing it is maintained with | ||
| 253 | version control. | ||
| 254 | |||
| 255 | @vindex vc-comment-alist | ||
| 256 | Each header is inserted surrounded by tabs, inside comment delimiters, | ||
| 257 | on a new line at point. Normally the ordinary comment | ||
| 258 | start and comment end strings of the current mode are used, but for | ||
| 259 | certain modes, there are special comment delimiters for this purpose; | ||
| 260 | the variable @code{vc-comment-alist} specifies them. Each element of | ||
| 261 | this list has the form @code{(@var{mode} @var{starter} @var{ender})}. | ||
| 262 | 234 | ||
| 263 | @vindex vc-static-header-alist | 235 | @vindex vc-static-header-alist |
| 264 | The variable @code{vc-static-header-alist} specifies further strings | 236 | The variable @code{vc-static-header-alist} specifies further strings |
| 265 | to add based on the name of the buffer. Its value should be a list of | 237 | to add based on the name of the buffer. Its value should be a list of |
| 266 | elements of the form @code{(@var{regexp} . @var{format})}. Whenever | 238 | elements of the form @code{(@var{regexp} . @var{format})}. Whenever |
| 267 | @var{regexp} matches the buffer name, @var{format} is inserted as part | 239 | @var{regexp} matches the buffer name, @var{format} is also inserted as |
| 268 | of the header. A header line is inserted for each element that matches | 240 | part of the version header. A @samp{%s} in @var{format} is replaced |
| 269 | the buffer name, and for each string specified by | 241 | with the file's version control type. |
| 270 | @code{vc-@var{backend}-header}. The header line is made by processing the | ||
| 271 | string from @code{vc-@var{backend}-header} with the format taken from the | ||
| 272 | element. The default value for @code{vc-static-header-alist} is as follows: | ||
| 273 | |||
| 274 | @example | ||
| 275 | @group | ||
| 276 | (("\\.c$" . | ||
| 277 | "\n#ifndef lint\nstatic char vcid[] = \"\%s\";\n\ | ||
| 278 | #endif /* lint */\n")) | ||
| 279 | @end group | ||
| 280 | @end example | ||
| 281 | |||
| 282 | @noindent | ||
| 283 | It specifies insertion of text of this form: | ||
| 284 | |||
| 285 | @example | ||
| 286 | @group | ||
| 287 | |||
| 288 | #ifndef lint | ||
| 289 | static char vcid[] = "@var{string}"; | ||
| 290 | #endif /* lint */ | ||
| 291 | @end group | ||
| 292 | @end example | ||
| 293 | |||
| 294 | @noindent | ||
| 295 | Note that the text above starts with a blank line. | ||
| 296 | |||
| 297 | If you use more than one version header in a file, put them close | ||
| 298 | together in the file. The mechanism in @code{revert-buffer} that | ||
| 299 | preserves markers may not handle markers positioned between two version | ||
| 300 | headers. | ||
| 301 | 242 | ||
| 302 | @node Customizing VC | 243 | @node Customizing VC |
| 303 | @subsection Customizing VC | 244 | @subsection Customizing VC |
| 304 | 245 | ||
| 305 | @vindex vc-handled-backends | 246 | @vindex vc-handled-backends |
| 306 | The variable @code{vc-handled-backends} determines which version | 247 | The variable @code{vc-handled-backends} determines which version |
| 307 | control systems VC should handle. The default value is @code{(RCS CVS | 248 | control systems VC should handle. The default value is @code{(RCS CVS |
| 308 | SVN SCCS Bzr Git Hg Mtn Arch)}, so it contains all the version systems | 249 | SVN SCCS Bzr Git Hg Mtn Arch)}, so it contains all the version systems |
| 309 | that are currently supported. If you want VC to ignore one or more of | 250 | that are currently supported. If you want VC to ignore one or more of |
| 310 | these systems, exclude its name from the list. To disable VC entirely, | 251 | these systems, exclude its name from the list. To disable VC |
| 311 | set this variable to @code{nil}. | 252 | entirely, set this variable to @code{nil}. |
| 312 | 253 | ||
| 313 | The order of systems in the list is significant: when you visit a file | 254 | The order of systems in the list is significant: when you visit a |
| 314 | registered in more than one system, VC uses the system that comes | 255 | file registered in more than one system, VC uses the system that comes |
| 315 | first in @code{vc-handled-backends} by default. The order is also | 256 | first in @code{vc-handled-backends} by default. The order is also |
| 316 | significant when you register a file for the first time, see | 257 | significant when you register a file for the first time |
| 317 | @iftex | 258 | @iftex |
| 318 | @ref{Registering,,,emacs, the Emacs Manual}, | 259 | (@pxref{Registering,,,emacs, the Emacs Manual}). |
| 319 | @end iftex | 260 | @end iftex |
| 320 | @ifnottex | 261 | @ifnottex |
| 321 | @ref{Registering}, | 262 | (@pxref{Registering}). |
| 322 | @end ifnottex | 263 | @end ifnottex |
| 323 | for details. | ||
| 324 | 264 | ||
| 325 | @menu | 265 | @menu |
| 326 | * General VC Options:: Options that apply to multiple back ends. | 266 | * General VC Options:: Options that apply to multiple back ends. |
| @@ -337,40 +277,27 @@ maintained with version control. If you want to make backup files even | |||
| 337 | for files that use version control, set the variable | 277 | for files that use version control, set the variable |
| 338 | @code{vc-make-backup-files} to a non-@code{nil} value. | 278 | @code{vc-make-backup-files} to a non-@code{nil} value. |
| 339 | 279 | ||
| 340 | @vindex vc-keep-workfiles | ||
| 341 | Normally the work file exists all the time, whether it is locked or | ||
| 342 | not. If you set @code{vc-keep-workfiles} to @code{nil}, then checking | ||
| 343 | in a new version with @kbd{C-x v v} deletes the work file; but any | ||
| 344 | attempt to visit the file with Emacs creates it again. (With CVS, work | ||
| 345 | files are always kept.) | ||
| 346 | |||
| 347 | @vindex vc-follow-symlinks | 280 | @vindex vc-follow-symlinks |
| 348 | Editing a version-controlled file through a symbolic link can be | 281 | @cindex symbolic links (and version control) |
| 349 | dangerous. It bypasses the version control system---you can edit the | 282 | Editing a version-controlled file through a symbolic link may cause |
| 350 | file without locking it, and fail to check your changes in. Also, | 283 | unexpected results, if you are unaware that the underlying file is |
| 351 | your changes might overwrite those of another user. To protect against | 284 | version-controlled. The variable @code{vc-follow-symlinks} controls |
| 352 | this, VC checks each symbolic link that you visit, to see if it points | 285 | what Emacs does if you try to visit a symbolic link pointing to a |
| 353 | to a file under version control. | 286 | version-controlled file. If the value is @code{ask} (the default), |
| 354 | 287 | Emacs asks for confirmation. If it is @code{nil}, Emacs just displays | |
| 355 | The variable @code{vc-follow-symlinks} controls what to do when a | 288 | a warning message. If it is @code{t}, Emacs automatically follows the |
| 356 | symbolic link points to a version-controlled file. If it is @code{nil}, | 289 | link and visits the real file instead. |
| 357 | VC only displays a warning message. If it is @code{t}, VC automatically | ||
| 358 | follows the link, and visits the real file instead, telling you about | ||
| 359 | this in the echo area. If the value is @code{ask} (the default), VC | ||
| 360 | asks you each time whether to follow the link. | ||
| 361 | 290 | ||
| 362 | @vindex vc-suppress-confirm | 291 | @vindex vc-suppress-confirm |
| 363 | If @code{vc-suppress-confirm} is non-@code{nil}, then @kbd{C-x v v} | 292 | If @code{vc-suppress-confirm} is non-@code{nil}, then @kbd{C-x v v} |
| 364 | and @kbd{C-x v i} can save the current buffer without asking, and | 293 | and @kbd{C-x v i} can save the current buffer without asking, and |
| 365 | @kbd{C-x v u} also operates without asking for confirmation. (This | 294 | @kbd{C-x v u} also operates without asking for confirmation. |
| 366 | variable does not affect @kbd{C-x v c}; that operation is so drastic | ||
| 367 | that it should always ask for confirmation.) | ||
| 368 | 295 | ||
| 369 | @vindex vc-command-messages | 296 | @vindex vc-command-messages |
| 370 | VC mode does much of its work by running the shell commands for the | 297 | VC mode does much of its work by running the shell commands for the |
| 371 | appropriate backend. If @code{vc-command-messages} is non-@code{nil}, VC | 298 | appropriate version control system. If @code{vc-command-messages} is |
| 372 | displays messages to indicate which shell commands it runs, and | 299 | non-@code{nil}, VC displays messages to indicate which shell commands |
| 373 | additional messages when the commands finish. | 300 | it runs, and additional messages when the commands finish. |
| 374 | 301 | ||
| 375 | @vindex vc-path | 302 | @vindex vc-path |
| 376 | You can specify additional directories to search for version control | 303 | You can specify additional directories to search for version control |