aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2006-02-08 00:00:22 +0000
committerRichard M. Stallman2006-02-08 00:00:22 +0000
commit191f7d865ef7d75d675b7f2ad35075f5320e96e8 (patch)
tree7e892675fdb4cf816e3bcf6f62845d6def110324
parentc9106f676067b1f0897556e9200a137d031afc0b (diff)
downloademacs-191f7d865ef7d75d675b7f2ad35075f5320e96e8.tar.gz
emacs-191f7d865ef7d75d675b7f2ad35075f5320e96e8.zip
(Format of ChangeLog): New node, split out from ChangeLog.
(ChangeLog): Clarifications in the remaining text. (Create Tags Table, Etags Regexps, Select Tags Table): Cleanups. (Find Tag): Add @w. (Tags Search): Explain tag table order here. Simplify grep ref. (List Tags): tags-tag-face is a variable, not a face. (Emerge): Cleanups.
-rw-r--r--man/maintaining.texi251
1 files changed, 104 insertions, 147 deletions
diff --git a/man/maintaining.texi b/man/maintaining.texi
index b885c8b7580..66a235ae119 100644
--- a/man/maintaining.texi
+++ b/man/maintaining.texi
@@ -14,6 +14,7 @@ useful for this purpose.
14 14
15@menu 15@menu
16* Change Log:: Maintaining a change history for your program. 16* Change Log:: Maintaining a change history for your program.
17* Format of ChangeLog:: What the change log file looks like.
17* Tags:: Go direct to any function in your program in one 18* Tags:: Go direct to any function in your program in one
18 command. Tags remembers which file it is in. 19 command. Tags remembers which file it is in.
19* Emerge:: A convenient way of merging two versions of a program. 20* Emerge:: A convenient way of merging two versions of a program.
@@ -22,6 +23,14 @@ useful for this purpose.
22@node Change Log 23@node Change Log
23@section Change Logs 24@section Change Logs
24 25
26 A change log file contains a chronological record of when and why you
27have changed a program, consisting of a sequence of entries describing
28individual changes. Normally it is kept in a file called
29@file{ChangeLog} in the same directory as the file you are editing, or
30one of its parent directories. A single @file{ChangeLog} file can
31record changes for all the files in its directory and all its
32subdirectories.
33
25@cindex change log 34@cindex change log
26@kindex C-x 4 a 35@kindex C-x 4 a
27@findex add-change-log-entry-other-window 36@findex add-change-log-entry-other-window
@@ -32,58 +41,6 @@ a backup file, it makes an entry appropriate for the file's
32parent---that is useful for making log entries for functions that 41parent---that is useful for making log entries for functions that
33have been deleted in the current version. 42have been deleted in the current version.
34 43
35 A change log file contains a chronological record of when and why you
36have changed a program, consisting of a sequence of entries describing
37individual changes. Normally it is kept in a file called
38@file{ChangeLog} in the same directory as the file you are editing, or
39one of its parent directories. A single @file{ChangeLog} file can
40record changes for all the files in its directory and all its
41subdirectories.
42
43 You should put a copyright notice and permission notice at the
44end of the change log file. Here is an example:
45
46@example
47Copyright 1997, 1998 Free Software Foundation, Inc.
48Copying and distribution of this file, with or without modification, are
49permitted provided the copyright notice and this notice are preserved.
50@end example
51
52@noindent
53Of course, you should substitute the proper years and copyright holder.
54
55 A change log entry starts with a header line that contains the current
56date, your name, and your email address (taken from the variable
57@code{add-log-mailing-address}). Aside from these header lines, every
58line in the change log starts with a space or a tab. The bulk of the
59entry consists of @dfn{items}, each of which starts with a line starting
60with whitespace and a star. Here are two entries, both dated in May
611993, with two items and one item respectively.
62
63@iftex
64@medbreak
65@end iftex
66@smallexample
671993-05-25 Richard Stallman <rms@@gnu.org>
68
69 * man.el: Rename symbols `man-*' to `Man-*'.
70 (manual-entry): Make prompt string clearer.
71
72 * simple.el (blink-matching-paren-distance):
73 Change default to 12,000.
74
751993-05-24 Richard Stallman <rms@@gnu.org>
76
77 * vc.el (minor-mode-map-alist): Don't use it if it's void.
78 (vc-cancel-version): Doc fix.
79@end smallexample
80
81 One entry can describe several changes; each change should have its
82own item, or its own line in an item. Normally there should be a
83blank line between items. When items are related (parts of the same
84change, in different places), group them by leaving no blank line
85between them.
86
87 @kbd{C-x 4 a} visits the change log file and creates a new entry 44 @kbd{C-x 4 a} visits the change log file and creates a new entry
88unless the most recent entry is for today's date and your name. It 45unless the most recent entry is for today's date and your name. It
89also creates a new item for the current file. For many languages, it 46also creates a new item for the current file. For many languages, it
@@ -95,6 +52,11 @@ changed.
95non-@code{nil}, @kbd{C-x 4 a} adds to any existing item for the file 52non-@code{nil}, @kbd{C-x 4 a} adds to any existing item for the file
96rather than starting a new item. 53rather than starting a new item.
97 54
55@vindex add-log-always-start-new-record
56 If @code{add-log-always-start-new-record} is non-@code{nil},
57@kbd{C-x 4 a} always makes a new entry, even if the last entry
58was made by you and on the same date.
59
98@vindex change-log-version-info-enabled 60@vindex change-log-version-info-enabled
99@vindex change-log-version-number-regexp-list 61@vindex change-log-version-number-regexp-list
100@cindex file version in change log entries 62@cindex file version in change log entries
@@ -104,11 +66,6 @@ change log entry. It finds the version number by searching the first
104ten percent of the file, using regular expressions from the variable 66ten percent of the file, using regular expressions from the variable
105@code{change-log-version-number-regexp-list}. 67@code{change-log-version-number-regexp-list}.
106 68
107@vindex add-log-always-start-new-record
108 If @code{add-log-always-start-new-record} is non-@code{nil},
109@kbd{C-x 4 a} always makes a new entry, even if the last entry
110was made by you and on the same date.
111
112@cindex Change Log mode 69@cindex Change Log mode
113@findex change-log-mode 70@findex change-log-mode
114 The change log file is visited in Change Log mode. In this major 71 The change log file is visited in Change Log mode. In this major
@@ -122,52 +79,55 @@ this is convenient for entering the contents of an entry.
122log files into a buffer in Change Log Mode, preserving the date 79log files into a buffer in Change Log Mode, preserving the date
123ordering of entries. 80ordering of entries.
124 81
125@findex change-log-redate 82 Version control systems are another way to keep track of changes in your
126@cindex converting change log date style 83program and keep a change log. @xref{Log Buffer}.
127 Versions of Emacs before 20.1 used a different format for the time of 84
128the change log entry: 85@node Format of ChangeLog
86@section Format of ChangeLog
129 87
88 A change log entry starts with a header line that contains the current
89date, your name, and your email address (taken from the variable
90@code{add-log-mailing-address}). Aside from these header lines, every
91line in the change log starts with a space or a tab. The bulk of the
92entry consists of @dfn{items}, each of which starts with a line starting
93with whitespace and a star. Here are two entries, both dated in May
941993, with two items and one item respectively.
95
96@iftex
97@medbreak
98@end iftex
130@smallexample 99@smallexample
131Fri May 25 11:23:23 1993 Richard Stallman <rms@@gnu.org> 1001993-05-25 Richard Stallman <rms@@gnu.org>
101
102 * man.el: Rename symbols `man-*' to `Man-*'.
103 (manual-entry): Make prompt string clearer.
104
105 * simple.el (blink-matching-paren-distance):
106 Change default to 12,000.
107
1081993-05-24 Richard Stallman <rms@@gnu.org>
109
110 * vc.el (minor-mode-map-alist): Don't use it if it's void.
111 (vc-cancel-version): Doc fix.
132@end smallexample 112@end smallexample
133 113
134@noindent 114 One entry can describe several changes; each change should have its
135The @kbd{M-x change-log-redate} command converts all the old-style 115own item, or its own line in an item. Normally there should be a
136date entries in the change log file visited in the current buffer to 116blank line between items. When items are related (parts of the same
137the new format, to make the file uniform in style. This is handy when 117change, in different places), group them by leaving no blank line
138entries are contributed by many different people, some of whom use old 118between them.
139versions of Emacs.
140 119
141 Version control systems are another way to keep track of changes in your 120 You should put a copyright notice and permission notice at the
142program and keep a change log. @xref{Log Buffer}. 121end of the change log file. Here is an example:
143 122
144@ignore 123@example
145@c This is commented out because the command is specific 124Copyright 1997, 1998 Free Software Foundation, Inc.
146@c to maintenance of Emacs itself. 125Copying and distribution of this file, with or without modification, are
147 126permitted provided the copyright notice and this notice are preserved.
148@node Authors 127@end example
149@section @file{AUTHORS} files 128
150@cindex @file{AUTHORS} file 129@noindent
151 130Of course, you should substitute the proper years and copyright holder.
152 Programs which have many contributors usually include a file named
153@file{AUTHORS} in their distribution, which lists the individual
154contributions. Emacs has a special command for maintaining the
155@file{AUTHORS} file that is part of the Emacs distribution.
156
157@findex authors
158 The @kbd{M-x authors} command prompts for the name of the root of the
159Emacs source directory. It then scans @file{ChangeLog} files and Lisp
160source files under that directory for information about authors of
161individual packages, and people who made changes in source files, and
162puts the information it gleans into a buffer named @samp{*Authors*}.
163You can then edit the contents of that buffer and merge it with the
164existing @file{AUTHORS} file.
165
166 Do not assume that this command finds all the contributors; don't
167assume that a person not listed in the output was not a contributor.
168If you merged in someone's contribution and did not put his name
169in the change log, he won't show up in @kbd{M-x authors} either.
170@end ignore
171 131
172@node Tags 132@node Tags
173@section Tags Tables 133@section Tags Tables
@@ -425,15 +385,15 @@ way it was made in the first place. If the tags table fails to record
425a tag, or records it for the wrong file, then Emacs cannot possibly 385a tag, or records it for the wrong file, then Emacs cannot possibly
426find its definition until you update the tags table. However, if the 386find its definition until you update the tags table. However, if the
427position recorded in the tags table becomes a little bit wrong (due to 387position recorded in the tags table becomes a little bit wrong (due to
428other editing), the only consequence is a slight delay in finding the 388other editing), the worst consequence is a slight delay in finding the
429tag. Even if the stored position is very far wrong, Emacs will still 389tag. Even if the stored position is very far wrong, Emacs will still
430find the tag, after searching most of the file for it. Even that 390find the tag, after searching most of the file for it. That delay is
431delay is hardly noticeable with today's computers. 391hardly noticeable with today's computers.
432 392
433 So you should update a tags table when you define new tags that you want 393 Thus, there is no need to update the tags table after each edit.
434to have listed, or when you move tag definitions from one file to another, 394You should update a tags table when you define new tags that you want
435or when changes become substantial. Normally there is no need to update 395to have listed, or when you move tag definitions from one file to
436the tags table after each edit, or even every day. 396another, or when changes become substantial.
437 397
438 One tags table can virtually include another. Specify the included 398 One tags table can virtually include another. Specify the included
439tags file name with the @samp{--include=@var{file}} option when 399tags file name with the @samp{--include=@var{file}} option when
@@ -480,21 +440,21 @@ place of a file name on the command line. @code{Etags} will read from
480standard input and mark the produced tags as belonging to the file 440standard input and mark the produced tags as belonging to the file
481@var{file}. 441@var{file}.
482 442
483 @samp{etags --help} prints the list of the languages @code{etags} 443 @samp{etags --help} outputs the list of the languages @code{etags}
484knows, and the file name rules for guessing the language. It also prints 444knows, and the file name rules for guessing the language. It also prints
485a list of all the available @code{etags} options, together with a short 445a list of all the available @code{etags} options, together with a short
486explanation. If followed by one or more @samp{--language=@var{lang}} 446explanation. If followed by one or more @samp{--language=@var{lang}}
487options, prints detailed information about how tags are generated for 447options, it outputs detailed information about how tags are generated for
488@var{lang}. 448@var{lang}.
489 449
490@node Etags Regexps 450@node Etags Regexps
491@subsection Etags Regexps 451@subsection Etags Regexps
492 452
493 The @samp{--regex} option provides a general way of recognizing tags 453 The @samp{--regex} option provides a general way of recognizing tags
494based on regexp matching. You can freely intermix it with file names. 454based on regexp matching. You can freely intermix this option with
455file names, and each one applies to the source files that follow it.
495If you specify multiple @samp{--regex} options, all of them are used 456If you specify multiple @samp{--regex} options, all of them are used
496in parallel, but each one applies only to the source files that follow 457in parallel. The syntax is:
497it. The syntax is:
498 458
499@smallexample 459@smallexample
500--regex=[@var{@{language@}}]/@var{tagregexp}/[@var{nameregexp}/]@var{modifiers} 460--regex=[@var{@{language@}}]/@var{tagregexp}/[@var{nameregexp}/]@var{modifiers}
@@ -537,8 +497,8 @@ Match this regular expression against the whole file, and allow
537@end table 497@end table
538 498
539 The @samp{-R} option cancels all the regexps defined by preceding 499 The @samp{-R} option cancels all the regexps defined by preceding
540@samp{--regex} options. It applies to the file names following it, as 500@samp{--regex} options. It too applies to the file names following
541you can see from the following example: 501it. Here's an example:
542 502
543@smallexample 503@smallexample
544etags --regex=/@var{reg1}/i voo.doo --regex=/@var{reg2}/m \ 504etags --regex=/@var{reg1}/i voo.doo --regex=/@var{reg2}/m \
@@ -647,30 +607,25 @@ etags --language=none \
647 607
648@vindex tags-file-name 608@vindex tags-file-name
649@findex visit-tags-table 609@findex visit-tags-table
650 Emacs has at any time one @dfn{selected} tags table, and all the commands 610 Emacs has at any time one @dfn{selected} tags table, and all the
651for working with tags tables use the selected one. To select a tags table, 611commands for working with tags tables use the selected one. To select
652type @kbd{M-x visit-tags-table}, which reads the tags table file name as an 612a tags table, type @kbd{M-x visit-tags-table}, which reads the tags
653argument. The name @file{TAGS} in the default directory is used as the 613table file name as an argument, with @file{TAGS} in the default
654default file name. 614directory as the default.
655 615
656 All this command does is store the file name in the variable 616 Emacs does not actually read in the tags table contents until you
657@code{tags-file-name}. Emacs does not actually read in the tags table 617try to use them; all @code{visit-tags-table} does is store the file
658contents until you try to use them. Setting this variable yourself is just 618name in the variable @code{tags-file-name}, and setting the variable
659as good as using @code{visit-tags-table}. The variable's initial value is 619yourself is just as good. The variable's initial value is @code{nil};
660@code{nil}; that value tells all the commands for working with tags tables 620that value tells all the commands for working with tags tables that
661that they must ask for a tags table file name to use. 621they must ask for a tags table file name to use.
662 622
663 Using @code{visit-tags-table} when a tags table is already loaded 623 Using @code{visit-tags-table} when a tags table is already loaded
664gives you a choice: you can add the new tags table to the current list 624gives you a choice: you can add the new tags table to the current list
665of tags tables, or start a new list. The tags commands use all the tags 625of tags tables, or start a new list. The tags commands use all the tags
666tables in the current list. If you start a new list, the new tags table 626tables in the current list. If you start a new list, the new tags table
667is used @emph{instead} of others. If you add the new table to the 627is used @emph{instead} of others. If you add the new table to the
668current list, it is used @emph{as well as} the others. When the tags 628current list, it is used @emph{as well as} the others.
669commands scan the list of tags tables, they don't always start at the
670beginning of the list; they start with the first tags table (if any)
671that describes the current file, proceed from there to the end of the
672list, and then scan from the beginning of the list until they have
673covered all the tables in the list.
674 629
675@vindex tags-table-list 630@vindex tags-table-list
676 You can specify a precise list of tags tables by setting the variable 631 You can specify a precise list of tags tables by setting the variable
@@ -749,13 +704,13 @@ alternative to @kbd{C-u M-.}.
749@findex find-tag-other-frame 704@findex find-tag-other-frame
750 Like most commands that can switch buffers, @code{find-tag} has a 705 Like most commands that can switch buffers, @code{find-tag} has a
751variant that displays the new buffer in another window, and one that 706variant that displays the new buffer in another window, and one that
752makes a new frame for it. The former is @kbd{C-x 4 .}, which invokes 707makes a new frame for it. The former is @w{@kbd{C-x 4 .}}, which invokes
753the command @code{find-tag-other-window}. The latter is @kbd{C-x 5 .}, 708the command @code{find-tag-other-window}. The latter is @w{@kbd{C-x 5 .}},
754which invokes @code{find-tag-other-frame}. 709which invokes @code{find-tag-other-frame}.
755 710
756 To move back to places you've found tags recently, use @kbd{C-u - 711 To move back to places you've found tags recently, use @kbd{C-u -
757M-.}; more generally, @kbd{M-.} with a negative numeric argument. This 712M-.}; more generally, @kbd{M-.} with a negative numeric argument. This
758command can take you to another buffer. @kbd{C-x 4 .} with a negative 713command can take you to another buffer. @w{@kbd{C-x 4 .}} with a negative
759argument finds the previous tag location in another window. 714argument finds the previous tag location in another window.
760 715
761@kindex M-* 716@kindex M-*
@@ -781,9 +736,13 @@ that it does regexp matching instead of substring matching.
781@cindex search and replace in multiple files 736@cindex search and replace in multiple files
782@cindex multiple-file search and replace 737@cindex multiple-file search and replace
783 738
784 The commands in this section visit and search all the files listed in the 739 The commands in this section visit and search all the files listed
785selected tags table, one by one. For these commands, the tags table serves 740in the selected tags table, one by one. For these commands, the tags
786only to specify a sequence of files to search. 741table serves only to specify a sequence of files to search. These
742commands scan the list of tags tables starting with the first tags
743table (if any) that describes the current file, proceed from there to
744the end of the list, and then scan from the beginning of the list
745until they have covered all the tables in the list.
787 746
788@table @kbd 747@table @kbd
789@item M-x tags-search @key{RET} @var{regexp} @key{RET} 748@item M-x tags-search @key{RET} @var{regexp} @key{RET}
@@ -846,9 +805,7 @@ continue to exist.
846 805
847 It may have struck you that @code{tags-search} is a lot like 806 It may have struck you that @code{tags-search} is a lot like
848@code{grep}. You can also run @code{grep} itself as an inferior of 807@code{grep}. You can also run @code{grep} itself as an inferior of
849Emacs and have Emacs show you the matching lines one by one. This works 808Emacs and have Emacs show you the matching lines one by one.
850much like running a compilation; finding the source locations of the
851@code{grep} matches works like finding the compilation errors.
852@xref{Grep Searching}. 809@xref{Grep Searching}.
853 810
854@node List Tags 811@node List Tags
@@ -882,9 +839,9 @@ of the tags files together with the tag names.
882 839
883@vindex tags-tag-face 840@vindex tags-tag-face
884@vindex tags-apropos-additional-actions 841@vindex tags-apropos-additional-actions
885You can customize the appearance of the output with the face 842 You can customize the appearance of the output by setting the
886@code{tags-tag-face}. You can display additional output with @kbd{M-x 843variable @code{tags-tag-face} to a face. You can display additional
887tags-apropos} by customizing the variable 844output with @kbd{M-x tags-apropos} by customizing the variable
888@code{tags-apropos-additional-actions}---see its documentation for 845@code{tags-apropos-additional-actions}---see its documentation for
889details. 846details.
890 847
@@ -896,11 +853,11 @@ name in the buffer. @xref{Symbol Completion}.
896@cindex Emerge 853@cindex Emerge
897@cindex merging files 854@cindex merging files
898 855
899It's not unusual for programmers to get their signals crossed and modify 856 It's not unusual for programmers to get their signals crossed and
900the same program in two different directions. To recover from this 857modify the same program in two different directions. To recover from
901confusion, you need to merge the two versions. Emerge makes this 858this confusion, you need to merge the two versions. Emerge makes this
902easier. See also @ref{Comparing Files}, for commands to compare 859easier. See also @ref{Comparing Files}, for other ways to compare
903in a more manual fashion, and @ref{Top, Ediff,, ediff, The Ediff Manual}. 860files, and @ref{Top, Ediff,, ediff, The Ediff Manual}.
904 861
905@menu 862@menu
906* Overview of Emerge:: How to start Emerge. Basic concepts. 863* Overview of Emerge:: How to start Emerge. Basic concepts.
@@ -918,7 +875,7 @@ in a more manual fashion, and @ref{Top, Ediff,, ediff, The Ediff Manual}.
918@node Overview of Emerge 875@node Overview of Emerge
919@subsection Overview of Emerge 876@subsection Overview of Emerge
920 877
921To start Emerge, run one of these four commands: 878 To start Emerge, run one of these four commands:
922 879
923@table @kbd 880@table @kbd
924@item M-x emerge-files 881@item M-x emerge-files