aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2011-12-25 22:16:00 +0800
committerChong Yidong2011-12-25 22:16:00 +0800
commit3d992aa0700903718a0f3d0d2be1b6879878f2b9 (patch)
tree9bb0e3d156bf341b48f3b000697bb59d2dc3cdf9
parent2170cb536dd1b4860618bf4ab7f1311c0d35e5a3 (diff)
downloademacs-3d992aa0700903718a0f3d0d2be1b6879878f2b9.tar.gz
emacs-3d992aa0700903718a0f3d0d2be1b6879878f2b9.zip
More updates to Maintaining chapter of Emacs manual.
* files.texi (Misc File Ops): Mention vc-delete-file. * maintaining.texi (Tags): Mention Semantic. (Create Tags Table, Etags Regexps): Copyedits. (Find Tag): Mention minibuffer completion. (List Tags): Mention completion-at-point. Completion is actually available in M-x list-tags. * programs.texi (Symbol Completion): Mention completion-at-point explicitly. * vc1-xtra.texi (VC Delete/Rename): Rename from Renaming and VC. Document vc-delete-file.
-rw-r--r--admin/FOR-RELEASE6
-rw-r--r--doc/emacs/ChangeLog16
-rw-r--r--doc/emacs/emacs.texi5
-rw-r--r--doc/emacs/files.texi13
-rw-r--r--doc/emacs/maintaining.texi303
-rw-r--r--doc/emacs/programs.texi20
-rw-r--r--doc/emacs/vc1-xtra.texi54
-rw-r--r--etc/NEWS4
8 files changed, 225 insertions, 196 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index fc36fb6e1d7..667a3e8effd 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -153,7 +153,7 @@ indent.texi cyd
153killing.texi cyd 153killing.texi cyd
154kmacro.texi cyd 154kmacro.texi cyd
155macos.texi 155macos.texi
156maintaining.texi 156maintaining.texi cyd
157major.texi 157major.texi
158mark.texi cyd 158mark.texi cyd
159mini.texi 159mini.texi
@@ -172,8 +172,8 @@ search.texi cyd
172sending.texi 172sending.texi
173text.texi cyd 173text.texi cyd
174trouble.texi 174trouble.texi
175vc-xtra.texi 175vc-xtra.texi cyd
176vc1-xtra.texi 176vc1-xtra.texi cyd
177windows.texi cyd 177windows.texi cyd
178xresources.texi 178xresources.texi
179 179
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 0621fa4e003..dfa8006e03c 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,19 @@
12011-12-25 Chong Yidong <cyd@gnu.org>
2
3 * maintaining.texi (Tags): Mention Semantic.
4 (Create Tags Table, Etags Regexps): Copyedits.
5 (Find Tag): Mention minibuffer completion.
6 (List Tags): Mention completion-at-point. Completion is actually
7 available in M-x list-tags.
8
9 * vc1-xtra.texi (VC Delete/Rename): Rename from Renaming and VC.
10 Document vc-delete-file.
11
12 * files.texi (Misc File Ops): Mention vc-delete-file.
13
14 * programs.texi (Symbol Completion): Mention completion-at-point
15 explicitly.
16
12011-12-22 Chong Yidong <cyd@gnu.org> 172011-12-22 Chong Yidong <cyd@gnu.org>
2 18
3 * maintaining.texi (Change Log Commands): Don't specially mention 19 * maintaining.texi (Change Log Commands): Don't specially mention
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index b12cdf6ddd1..7f703fbaad0 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -782,9 +782,8 @@ Multiple Branches of a File
782Miscellaneous Commands and Features of VC 782Miscellaneous Commands and Features of VC
783 783
784* Change Logs and VC:: Generating a change log file from log entries. 784* Change Logs and VC:: Generating a change log file from log entries.
785* Renaming and VC:: A command to rename both the source and master 785* VC Delete/Rename:: Deleting and renaming version-controlled files.
786 file correctly. 786* Revision Tags:: Symbolic names for revisions.
787* Revision Tags:: Symbolic names for revisions.
788* Version Headers:: Inserting version control headers into working files. 787* Version Headers:: Inserting version control headers into working files.
789 788
790Customizing VC 789Customizing VC
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 96c38f4190e..9b2322e1850 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -1485,6 +1485,12 @@ argument to @kbd{M-x delete-file} or @kbd{M-x delete-directory} makes
1485them delete outright, instead of using the Trash, regardless of 1485them delete outright, instead of using the Trash, regardless of
1486@code{delete-by-moving-to-trash}. 1486@code{delete-by-moving-to-trash}.
1487 1487
1488@ifnottex
1489 If a file is under version control (@pxref{Version Control}), you
1490should delete it using @kbd{M-x vc-delete-file} instead of @kbd{M-x
1491delete-file}. @xref{VC Delete/Rename}.
1492@end ifnottex
1493
1488@findex copy-file 1494@findex copy-file
1489@cindex copying files 1495@cindex copying files
1490 @kbd{M-x copy-file} reads the file @var{old} and writes a new file 1496 @kbd{M-x copy-file} reads the file @var{old} and writes a new file
@@ -1514,10 +1520,9 @@ applies to all the remaining commands in this section. All of them
1514ask for confirmation when the new file name already exists, too. 1520ask for confirmation when the new file name already exists, too.
1515 1521
1516@ifnottex 1522@ifnottex
1517 Note that if a file is under version control (@pxref{Version 1523 If a file is under version control (@pxref{Version Control}), you
1518Control}), you normally ought to rename it via the version control 1524should rename it using @kbd{M-x vc-rename-file} instead of @kbd{M-x
1519system instead, using @kbd{M-x vc-rename-file}. @xref{Renaming and 1525rename-file}. @xref{VC Delete/Rename}.
1520VC}.
1521@end ifnottex 1526@end ifnottex
1522 1527
1523@findex add-name-to-file 1528@findex add-name-to-file
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
index 68a34ca3a77..88bd5949b47 100644
--- a/doc/emacs/maintaining.texi
+++ b/doc/emacs/maintaining.texi
@@ -1188,7 +1188,7 @@ Unmark the file or directory on the current line. If the region is
1188active, unmark all the files in the region (@code{vc-dir-unmark}). 1188active, unmark all the files in the region (@code{vc-dir-unmark}).
1189 1189
1190@item U 1190@item U
1191If point is on a file entry, umark all files with the same status; if 1191If point is on a file entry, unmark all files with the same status; if
1192point is on a directory entry, unmark all files in that directory tree 1192point is on a directory entry, unmark all files in that directory tree
1193(@code{vc-dir-unmark-all-files}). With a prefix argument, unmark all 1193(@code{vc-dir-unmark-all-files}). With a prefix argument, unmark all
1194files and directories. 1194files and directories.
@@ -1567,8 +1567,8 @@ Of course, you should substitute the proper years and copyright holder.
1567@cindex tags and tag tables 1567@cindex tags and tag tables
1568 1568
1569 A @dfn{tag} is a reference to a subunit in a program or in a 1569 A @dfn{tag} is a reference to a subunit in a program or in a
1570document. In program source code, tags reference syntactic elements 1570document. In source code, tags reference syntactic elements of the
1571of the program: functions, subroutines, data types, macros, etc. In a 1571program: functions, subroutines, data types, macros, etc. In a
1572document, tags reference chapters, sections, appendices, etc. Each 1572document, tags reference chapters, sections, appendices, etc. Each
1573tag specifies the name of the file where the corresponding subunit is 1573tag specifies the name of the file where the corresponding subunit is
1574defined, and the position of the subunit's definition in that file. 1574defined, and the position of the subunit's definition in that file.
@@ -1582,34 +1582,36 @@ a Yacc parser, or from Lex scanner definitions; @file{.i} preprocessed
1582C files; and Fortran files produced by preprocessing @file{.fpp} 1582C files; and Fortran files produced by preprocessing @file{.fpp}
1583source files. 1583source files.
1584 1584
1585 To produce a tags table, you use the @samp{etags} command, 1585@cindex etags
1586submitting it a document or the source code of a program. 1586 To produce a tags table, you run the @command{etags} shell command
1587@samp{etags} writes the tags to a @dfn{tags table file}, or @dfn{tags 1587on a document or the source code file. The @samp{etags} program
1588file} in short. The conventional name for a tags file is @file{TAGS}. 1588writes the tags to a @dfn{tags table file}, or @dfn{tags file} in
1589short. The conventional name for a tags file is @file{TAGS}.
1590@xref{Create Tags Table}.
1589 1591
1590 Emacs uses the information recorded in tags tables in commands that 1592 Emacs provides many commands for searching and replacing using the
1591search or replace through multiple source files: these commands use 1593information recorded in tags tables. For instance, the @kbd{M-.}
1592the names of the source files recorded in the tags table to know which 1594(@code{find-tag}) jumps to the location of a specified function
1593files to search. Other commands, such as @kbd{M-.}, which finds the 1595definition in its source file. @xref{Find Tag}.
1594definition of a function, use the recorded information about the
1595function names and positions to find the source file and the position
1596within that file where the function is defined.
1597 1596
1598@cindex C++ class browser, tags 1597@cindex C++ class browser, tags
1599@cindex tags, C++ 1598@cindex tags, C++
1600@cindex class browser, C++ 1599@cindex class browser, C++
1601@cindex Ebrowse 1600@cindex Ebrowse
1602 See also the Ebrowse facility, which is tailored for C++. 1601 The Ebrowse facility is similar to @command{etags} but specifically
1603@xref{Top,, Ebrowse, ebrowse, Ebrowse User's Manual}. 1602tailored for C++. @xref{Top,, Ebrowse, ebrowse, Ebrowse User's
1603Manual}. The Semantic package provides another way to generate and
1604use tags, separate from the @command{etags} facility.
1605@xref{Semantic}.
1604 1606
1605@menu 1607@menu
1606* Tag Syntax:: Tag syntax for various types of code and text files. 1608* Tag Syntax:: Tag syntax for various types of code and text files.
1607* Create Tags Table:: Creating a tags table with @code{etags}. 1609* Create Tags Table:: Creating a tags table with @command{etags}.
1608* Etags Regexps:: Create arbitrary tags using regular expressions. 1610* Etags Regexps:: Create arbitrary tags using regular expressions.
1609* Select Tags Table:: How to visit a tags table. 1611* Select Tags Table:: How to visit a tags table.
1610* Find Tag:: Commands to find the definition of a specific tag. 1612* Find Tag:: Commands to find the definition of a specific tag.
1611* Tags Search:: Using a tags table for searching and replacing. 1613* Tags Search:: Using a tags table for searching and replacing.
1612* List Tags:: Listing and finding tags defined in a file. 1614* List Tags:: Using tags for completion, and listing them.
1613@end menu 1615@end menu
1614 1616
1615@node Tag Syntax 1617@node Tag Syntax
@@ -1631,7 +1633,7 @@ and @samp{--no-members} can make the tags table file much smaller.
1631 1633
1632You can tag function declarations and external variables in addition 1634You can tag function declarations and external variables in addition
1633to function definitions by giving the @samp{--declarations} option to 1635to function definitions by giving the @samp{--declarations} option to
1634@code{etags}. 1636@command{etags}.
1635 1637
1636@item 1638@item
1637In C++ code, in addition to all the tag constructs of C code, member 1639In C++ code, in addition to all the tag constructs of C code, member
@@ -1648,15 +1650,15 @@ Tags for variables and functions in classes are named
1648@samp{@var{class}.@var{variable}} and @samp{@var{class}.@var{function}}. 1650@samp{@var{class}.@var{variable}} and @samp{@var{class}.@var{function}}.
1649 1651
1650@item 1652@item
1651In La@TeX{} text, the argument of any of the commands @code{\chapter}, 1653In La@TeX{} documents, the arguments for @code{\chapter},
1652@code{\section}, @code{\subsection}, @code{\subsubsection}, 1654@code{\section}, @code{\subsection}, @code{\subsubsection},
1653@code{\eqno}, @code{\label}, @code{\ref}, @code{\cite}, 1655@code{\eqno}, @code{\label}, @code{\ref}, @code{\cite},
1654@code{\bibitem}, @code{\part}, @code{\appendix}, @code{\entry}, 1656@code{\bibitem}, @code{\part}, @code{\appendix}, @code{\entry},
1655@code{\index}, @code{\def}, @code{\newcommand}, @code{\renewcommand}, 1657@code{\index}, @code{\def}, @code{\newcommand}, @code{\renewcommand},
1656@code{\newenvironment} or @code{\renewenvironment} is a tag.@refill 1658@code{\newenvironment} and @code{\renewenvironment} are tags.
1657 1659
1658Other commands can make tags as well, if you specify them in the 1660Other commands can make tags as well, if you specify them in the
1659environment variable @env{TEXTAGS} before invoking @code{etags}. The 1661environment variable @env{TEXTAGS} before invoking @command{etags}. The
1660value of this environment variable should be a colon-separated list of 1662value of this environment variable should be a colon-separated list of
1661command names. For example, 1663command names. For example,
1662 1664
@@ -1788,9 +1790,9 @@ Regexps}) to handle other formats and languages.
1788 1790
1789@node Create Tags Table 1791@node Create Tags Table
1790@subsection Creating Tags Tables 1792@subsection Creating Tags Tables
1791@cindex @code{etags} program 1793@cindex @command{etags} program
1792 1794
1793 The @code{etags} program is used to create a tags table file. It knows 1795 The @command{etags} program is used to create a tags table file. It knows
1794the syntax of several languages, as described in 1796the syntax of several languages, as described in
1795@iftex 1797@iftex
1796the previous section. 1798the previous section.
@@ -1798,53 +1800,46 @@ the previous section.
1798@ifnottex 1800@ifnottex
1799@ref{Tag Syntax}. 1801@ref{Tag Syntax}.
1800@end ifnottex 1802@end ifnottex
1801Here is how to run @code{etags}: 1803Here is how to run @command{etags}:
1802 1804
1803@example 1805@example
1804etags @var{inputfiles}@dots{} 1806etags @var{inputfiles}@dots{}
1805@end example 1807@end example
1806 1808
1807@noindent 1809@noindent
1808The @code{etags} program reads the specified files, and writes a tags 1810The @command{etags} program reads the specified files, and writes a tags
1809table named @file{TAGS} in the current working directory. You can 1811table named @file{TAGS} in the current working directory. You can
1810optionally specify a different file name for the tags table by using the 1812optionally specify a different file name for the tags table by using the
1811@samp{--output=@var{file}} option; specifying @file{-} as a file name 1813@samp{--output=@var{file}} option; specifying @file{-} as a file name
1812prints the tags table to standard output. 1814prints the tags table to standard output.
1813 1815
1814 If the specified files don't exist, @code{etags} looks for 1816 If the specified files don't exist, @command{etags} looks for
1815compressed versions of them and uncompresses them to read them. Under 1817compressed versions of them and uncompresses them to read them. Under
1816MS-DOS, @code{etags} also looks for file names like @file{mycode.cgz} 1818MS-DOS, @command{etags} also looks for file names like @file{mycode.cgz}
1817if it is given @samp{mycode.c} on the command line and @file{mycode.c} 1819if it is given @samp{mycode.c} on the command line and @file{mycode.c}
1818does not exist. 1820does not exist.
1819 1821
1820 @code{etags} recognizes the language used in an input file based on 1822 If the tags table becomes outdated due to changes in the files
1821its file name and contents. You can specify the language with the 1823described in it, you can update it by running the @command{etags}
1822@samp{--language=@var{name}} option, described below. 1824program again. If the tags table does not record a tag, or records it
1823 1825for the wrong file, then Emacs will not be able to find that
1824 If the tags table data become outdated due to changes in the files 1826definition until you update the tags table. But if the position
1825described in the table, the way to update the tags table is the same 1827recorded in the tags table becomes a little bit wrong (due to other
1826way it was made in the first place. If the tags table fails to record 1828editing), Emacs will still be able to find the right position, with a
1827a tag, or records it for the wrong file, then Emacs cannot possibly 1829slight delay.
1828find its definition until you update the tags table. However, if the
1829position recorded in the tags table becomes a little bit wrong (due to
1830other editing), the worst consequence is a slight delay in finding the
1831tag. Even if the stored position is very far wrong, Emacs will still
1832find the tag, after searching most of the file for it. That delay is
1833hardly noticeable with today's computers.
1834 1830
1835 Thus, there is no need to update the tags table after each edit. 1831 Thus, there is no need to update the tags table after each edit.
1836You should update a tags table when you define new tags that you want 1832You should update a tags table when you define new tags that you want
1837to have listed, or when you move tag definitions from one file to 1833to have listed, or when you move tag definitions from one file to
1838another, or when changes become substantial. 1834another, or when changes become substantial.
1839 1835
1840 One tags table can virtually include another. Specify the included 1836 You can make a tags table @dfn{include} another tags table, by
1841tags file name with the @samp{--include=@var{file}} option when 1837passing the @samp{--include=@var{file}} option to @command{etags}. It
1842creating the file that is to include it. The latter file then acts as 1838then covers all the files covered by the included tags file, as well
1843if it covered all the source files specified in the included file, as 1839as its own.
1844well as the files it directly contains.
1845 1840
1846 If you specify the source files with relative file names when you run 1841 If you specify the source files with relative file names when you run
1847@code{etags}, the tags file will contain file names relative to the 1842@command{etags}, the tags file will contain file names relative to the
1848directory where the tags file was initially written. This way, you can 1843directory where the tags file was initially written. This way, you can
1849move an entire directory tree containing both the tags file and the 1844move an entire directory tree containing both the tags file and the
1850source files, and the tags file will still refer correctly to the source 1845source files, and the tags file will still refer correctly to the source
@@ -1857,40 +1852,41 @@ example, when writing the tags to @file{/dev/stdout}.
1857pointing to a tags file in a different directory, because this would 1852pointing to a tags file in a different directory, because this would
1858generally render the file names invalid. 1853generally render the file names invalid.
1859 1854
1860 If you specify absolute file names as arguments to @code{etags}, then 1855 If you specify absolute file names as arguments to @command{etags}, then
1861the tags file will contain absolute file names. This way, the tags file 1856the tags file will contain absolute file names. This way, the tags file
1862will still refer to the same files even if you move it, as long as the 1857will still refer to the same files even if you move it, as long as the
1863source files remain in the same place. Absolute file names start with 1858source files remain in the same place. Absolute file names start with
1864@samp{/}, or with @samp{@var{device}:/} on MS-DOS and MS-Windows. 1859@samp{/}, or with @samp{@var{device}:/} on MS-DOS and MS-Windows.
1865 1860
1866 When you want to make a tags table from a great number of files, you 1861 When you want to make a tags table from a great number of files,
1867may have problems listing them on the command line, because some systems 1862you may have problems listing them on the command line, because some
1868have a limit on its length. The simplest way to circumvent this limit 1863systems have a limit on its length. You can circumvent this limit by
1869is to tell @code{etags} to read the file names from its standard input, 1864telling @command{etags} to read the file names from its standard
1870by typing a dash in place of the file names, like this: 1865input, by typing a dash in place of the file names, like this:
1871 1866
1872@smallexample 1867@smallexample
1873find . -name "*.[chCH]" -print | etags - 1868find . -name "*.[chCH]" -print | etags -
1874@end smallexample 1869@end smallexample
1875 1870
1876 Use the option @samp{--language=@var{name}} to specify the language 1871 @command{etags} recognizes the language used in an input file based
1877explicitly. You can intermix these options with file names; each one 1872on its file name and contents. You can specify the language
1878applies to the file names that follow it. Specify 1873explicitly with the @samp{--language=@var{name}} option. You can
1879@samp{--language=auto} to tell @code{etags} to resume guessing the 1874intermix these options with file names; each one applies to the file
1880language from the file names and file contents. Specify 1875names that follow it. Specify @samp{--language=auto} to tell
1881@samp{--language=none} to turn off language-specific processing 1876@command{etags} to resume guessing the language from the file names
1882entirely; then @code{etags} recognizes tags by regexp matching alone 1877and file contents. Specify @samp{--language=none} to turn off
1883(@pxref{Etags Regexps}). 1878language-specific processing entirely; then @command{etags} recognizes
1879tags by regexp matching alone (@pxref{Etags Regexps}).
1884 1880
1885 The option @samp{--parse-stdin=@var{file}} is mostly useful when 1881 The option @samp{--parse-stdin=@var{file}} is mostly useful when
1886calling @code{etags} from programs. It can be used (only once) in 1882calling @command{etags} from programs. It can be used (only once) in
1887place of a file name on the command line. @code{Etags} will read from 1883place of a file name on the command line. @command{etags} will read from
1888standard input and mark the produced tags as belonging to the file 1884standard input and mark the produced tags as belonging to the file
1889@var{file}. 1885@var{file}.
1890 1886
1891 @samp{etags --help} outputs the list of the languages @code{etags} 1887 @samp{etags --help} outputs the list of the languages @command{etags}
1892knows, and the file name rules for guessing the language. It also prints 1888knows, and the file name rules for guessing the language. It also prints
1893a list of all the available @code{etags} options, together with a short 1889a list of all the available @command{etags} options, together with a short
1894explanation. If followed by one or more @samp{--language=@var{lang}} 1890explanation. If followed by one or more @samp{--language=@var{lang}}
1895options, it outputs detailed information about how tags are generated for 1891options, it outputs detailed information about how tags are generated for
1896@var{lang}. 1892@var{lang}.
@@ -1898,21 +1894,22 @@ options, it outputs detailed information about how tags are generated for
1898@node Etags Regexps 1894@node Etags Regexps
1899@subsection Etags Regexps 1895@subsection Etags Regexps
1900 1896
1901 The @samp{--regex} option provides a general way of recognizing tags 1897 The @samp{--regex} option to @command{etags} allows tags to be
1902based on regexp matching. You can freely intermix this option with 1898recognized by regular expression matching. You can intermix this
1903file names, and each one applies to the source files that follow it. 1899option with file names; each one applies to the source files that
1904If you specify multiple @samp{--regex} options, all of them are used 1900follow it. If you specify multiple @samp{--regex} options, all of
1905in parallel. The syntax is: 1901them are used in parallel. The syntax is:
1906 1902
1907@smallexample 1903@smallexample
1908--regex=[@var{@{language@}}]/@var{tagregexp}/[@var{nameregexp}/]@var{modifiers} 1904--regex=[@var{@{language@}}]/@var{tagregexp}/[@var{nameregexp}/]@var{modifiers}
1909@end smallexample 1905@end smallexample
1910 1906
1911 The essential part of the option value is @var{tagregexp}, the 1907@noindent
1912regexp for matching tags. It is always used anchored, that is, it 1908The essential part of the option value is @var{tagregexp}, the regexp
1913only matches at the beginning of a line. If you want to allow 1909for matching tags. It is always used anchored, that is, it only
1914indented tags, use a regexp that matches initial whitespace; start it 1910matches at the beginning of a line. If you want to allow indented
1915with @samp{[ \t]*}. 1911tags, use a regexp that matches initial whitespace; start it with
1912@samp{[ \t]*}.
1916 1913
1917 In these regular expressions, @samp{\} quotes the next character, and 1914 In these regular expressions, @samp{\} quotes the next character, and
1918all the GCC character escape sequences are supported (@samp{\a} for 1915all the GCC character escape sequences are supported (@samp{\a} for
@@ -1929,7 +1926,7 @@ completion on tag names more reliably. You can find some examples
1929below. 1926below.
1930 1927
1931 The @var{modifiers} are a sequence of zero or more characters that 1928 The @var{modifiers} are a sequence of zero or more characters that
1932modify the way @code{etags} does the matching. A regexp with no 1929modify the way @command{etags} does the matching. A regexp with no
1933modifiers is applied sequentially to each line of the input file, in a 1930modifiers is applied sequentially to each line of the input file, in a
1934case-sensitive way. The modifiers and their meanings are: 1931case-sensitive way. The modifiers and their meanings are:
1935 1932
@@ -1954,22 +1951,22 @@ etags --regex=/@var{reg1}/i voo.doo --regex=/@var{reg2}/m \
1954@end smallexample 1951@end smallexample
1955 1952
1956@noindent 1953@noindent
1957Here @code{etags} chooses the parsing language for @file{voo.doo} and 1954Here @command{etags} chooses the parsing language for @file{voo.doo} and
1958@file{bar.ber} according to their contents. @code{etags} also uses 1955@file{bar.ber} according to their contents. @command{etags} also uses
1959@var{reg1} to recognize additional tags in @file{voo.doo}, and both 1956@var{reg1} to recognize additional tags in @file{voo.doo}, and both
1960@var{reg1} and @var{reg2} to recognize additional tags in 1957@var{reg1} and @var{reg2} to recognize additional tags in
1961@file{bar.ber}. @var{reg1} is checked against each line of 1958@file{bar.ber}. @var{reg1} is checked against each line of
1962@file{voo.doo} and @file{bar.ber}, in a case-insensitive way, while 1959@file{voo.doo} and @file{bar.ber}, in a case-insensitive way, while
1963@var{reg2} is checked against the whole @file{bar.ber} file, 1960@var{reg2} is checked against the whole @file{bar.ber} file,
1964permitting multi-line matches, in a case-sensitive way. @code{etags} 1961permitting multi-line matches, in a case-sensitive way. @command{etags}
1965uses only the Lisp tags rules, with no user-specified regexp matching, 1962uses only the Lisp tags rules, with no user-specified regexp matching,
1966to recognize tags in @file{los.er}. 1963to recognize tags in @file{los.er}.
1967 1964
1968 You can restrict a @samp{--regex} option to match only files of a 1965 You can restrict a @samp{--regex} option to match only files of a
1969given language by using the optional prefix @var{@{language@}}. 1966given language by using the optional prefix @var{@{language@}}.
1970(@samp{etags --help} prints the list of languages recognized by 1967(@samp{etags --help} prints the list of languages recognized by
1971@code{etags}.) This is particularly useful when storing many 1968@command{etags}.) This is particularly useful when storing many
1972predefined regular expressions for @code{etags} in a file. The 1969predefined regular expressions for @command{etags} in a file. The
1973following example tags the @code{DEFVAR} macros in the Emacs source 1970following example tags the @code{DEFVAR} macros in the Emacs source
1974files, for the C language only: 1971files, for the C language only:
1975 1972
@@ -1979,7 +1976,7 @@ files, for the C language only:
1979 1976
1980@noindent 1977@noindent
1981When you have complex regular expressions, you can store the list of 1978When you have complex regular expressions, you can store the list of
1982them in a file. The following option syntax instructs @code{etags} to 1979them in a file. The following option syntax instructs @command{etags} to
1983read two files of regular expressions. The regular expressions 1980read two files of regular expressions. The regular expressions
1984contained in the second file are matched without regard to case. 1981contained in the second file are matched without regard to case.
1985 1982
@@ -1988,9 +1985,9 @@ contained in the second file are matched without regard to case.
1988@end smallexample 1985@end smallexample
1989 1986
1990@noindent 1987@noindent
1991A regex file for @code{etags} contains one regular expression per 1988A regex file for @command{etags} contains one regular expression per
1992line. Empty lines, and lines beginning with space or tab are ignored. 1989line. Empty lines, and lines beginning with space or tab are ignored.
1993When the first character in a line is @samp{@@}, @code{etags} assumes 1990When the first character in a line is @samp{@@}, @command{etags} assumes
1994that the rest of the line is the name of another file of regular 1991that the rest of the line is the name of another file of regular
1995expressions; thus, one such file can include another file. All the 1992expressions; thus, one such file can include another file. All the
1996other lines are taken to be regular expressions. If the first 1993other lines are taken to be regular expressions. If the first
@@ -2053,14 +2050,14 @@ etags --language=none \
2053@node Select Tags Table 2050@node Select Tags Table
2054@subsection Selecting a Tags Table 2051@subsection Selecting a Tags Table
2055 2052
2056@vindex tags-file-name
2057@findex visit-tags-table 2053@findex visit-tags-table
2058 Emacs has at any time one @dfn{selected} tags table, and all the 2054 Emacs has at any time one @dfn{selected} tags table. All the
2059commands for working with tags tables use the selected one. To select 2055commands for working with tags tables use the selected one. To select
2060a tags table, type @kbd{M-x visit-tags-table}, which reads the tags 2056a tags table, type @kbd{M-x visit-tags-table}, which reads the tags
2061table file name as an argument, with @file{TAGS} in the default 2057table file name as an argument, with @file{TAGS} in the default
2062directory as the default. 2058directory as the default.
2063 2059
2060@vindex tags-file-name
2064 Emacs does not actually read in the tags table contents until you 2061 Emacs does not actually read in the tags table contents until you
2065try to use them; all @code{visit-tags-table} does is store the file 2062try to use them; all @code{visit-tags-table} does is store the file
2066name in the variable @code{tags-file-name}, and setting the variable 2063name in the variable @code{tags-file-name}, and setting the variable
@@ -2124,27 +2121,25 @@ Pop back to where you previously invoked @kbd{M-.} and friends.
2124 2121
2125@kindex M-. 2122@kindex M-.
2126@findex find-tag 2123@findex find-tag
2127 @kbd{M-.}@: (@code{find-tag}) is the command to find the definition of 2124 @kbd{M-.}@: (@code{find-tag}) prompts for a tag name and jumps to
2128a specified tag. It searches through the tags table for that tag, as a 2125its source definition. It works by searching through the tags table
2129string, and then uses the tags table info to determine the file that the 2126for that tag's file and approximate character position, visiting that
2130definition is in and the approximate character position in the file of 2127file, and searching for the tag definition at ever-increasing
2131the definition. Then @code{find-tag} visits that file, moves point to 2128distances away from the recorded approximate position.
2132the approximate character position, and searches ever-increasing 2129
2133distances away to find the tag definition. 2130 When entering the tag argument to @kbd{M-.}, the usual minibuffer
2134 2131completion commands can be used (@pxref{Completion}), with the tag
2135 If an empty argument is given (just type @key{RET}), the balanced 2132names in the selected tags table as completion candidates. If you
2136expression in the buffer before or around point is used as the 2133specify an empty argument, the balanced expression in the buffer
2137@var{tag} argument. @xref{Expressions}. 2134before or around point is the default argument. @xref{Expressions}.
2138 2135
2139 You don't need to give @kbd{M-.} the full name of the tag; a part 2136 You don't need to give @kbd{M-.} the full name of the tag; a part
2140will do. This is because @kbd{M-.} finds tags in the table which 2137will do. @kbd{M-.} finds tags which contain that argument as a
2141contain @var{tag} as a substring. However, it prefers an exact match 2138substring. However, it prefers an exact match to a substring match.
2142to a substring match. To find other tags that match the same 2139To find other tags that match the same substring, give @code{find-tag}
2143substring, give @code{find-tag} a numeric argument, as in @kbd{C-u 2140a numeric argument, as in @kbd{C-u M-.} or @kbd{M-0 M-.}; this does
2144M-.}; this does not read a tag name, but continues searching the tags 2141not read a tag name, but continues searching the tags table's text for
2145table's text for another tag containing the same substring last used. 2142another tag containing the same substring last used.
2146If you have a real @key{META} key, @kbd{M-0 M-.}@: is an easier
2147alternative to @kbd{C-u M-.}.
2148 2143
2149@kindex C-x 4 . 2144@kindex C-x 4 .
2150@findex find-tag-other-window 2145@findex find-tag-other-window
@@ -2152,23 +2147,23 @@ alternative to @kbd{C-u M-.}.
2152@findex find-tag-other-frame 2147@findex find-tag-other-frame
2153 Like most commands that can switch buffers, @code{find-tag} has a 2148 Like most commands that can switch buffers, @code{find-tag} has a
2154variant that displays the new buffer in another window, and one that 2149variant that displays the new buffer in another window, and one that
2155makes a new frame for it. The former is @w{@kbd{C-x 4 .}}, which invokes 2150makes a new frame for it. The former is @w{@kbd{C-x 4 .}}
2156the command @code{find-tag-other-window}. The latter is @w{@kbd{C-x 5 .}}, 2151(@code{find-tag-other-window}), and the latter is @w{@kbd{C-x 5 .}}
2157which invokes @code{find-tag-other-frame}. 2152(@code{find-tag-other-frame}).
2158 2153
2159 To move back to places you've found tags recently, use @kbd{C-u - 2154 To move back to previous tag definitions, use @kbd{C-u - M-.}; more
2160M-.}; more generally, @kbd{M-.} with a negative numeric argument. This 2155generally, @kbd{M-.} with a negative numeric argument. Similarly,
2161command can take you to another buffer. @w{@kbd{C-x 4 .}} with a negative 2156@w{@kbd{C-x 4 .}} with a negative argument finds the previous tag
2162argument finds the previous tag location in another window. 2157location in another window.
2163 2158
2164@kindex M-* 2159@kindex M-*
2165@findex pop-tag-mark 2160@findex pop-tag-mark
2166@vindex find-tag-marker-ring-length 2161@vindex find-tag-marker-ring-length
2167 As well as going back to places you've found tags recently, you can go 2162 As well as going back to places you've found tags recently, you can
2168back to places @emph{from where} you found them. Use @kbd{M-*}, which 2163go back to places @emph{from where} you found them, using @kbd{M-*}
2169invokes the command @code{pop-tag-mark}, for this. Typically you would 2164(@code{pop-tag-mark}). Thus you can find and examine the definition
2170find and study the definition of something with @kbd{M-.} and then 2165of something with @kbd{M-.} and then return to where you were with
2171return to where you were with @kbd{M-*}. 2166@kbd{M-*}.
2172 2167
2173 Both @kbd{C-u - M-.} and @kbd{M-*} allow you to retrace your steps to 2168 Both @kbd{C-u - M-.} and @kbd{M-*} allow you to retrace your steps to
2174a depth determined by the variable @code{find-tag-marker-ring-length}. 2169a depth determined by the variable @code{find-tag-marker-ring-length}.
@@ -2212,10 +2207,10 @@ can follow its progress. As soon as it finds an occurrence,
2212 2207
2213@kindex M-, 2208@kindex M-,
2214@findex tags-loop-continue 2209@findex tags-loop-continue
2215 Having found one match, you probably want to find all the rest. To find 2210 Having found one match, you probably want to find all the rest.
2216one more match, type @kbd{M-,} (@code{tags-loop-continue}) to resume the 2211Type @kbd{M-,} (@code{tags-loop-continue}) to resume the
2217@code{tags-search}. This searches the rest of the current buffer, followed 2212@code{tags-search}, finding one more match. This searches the rest of
2218by the remaining files of the tags table.@refill 2213the current buffer, followed by the remaining files of the tags table.
2219 2214
2220@findex tags-query-replace 2215@findex tags-query-replace
2221 @kbd{M-x tags-query-replace} performs a single 2216 @kbd{M-x tags-query-replace} performs a single
@@ -2252,56 +2247,56 @@ have to search (those which are not already visited in Emacs buffers).
2252Buffers in which no match is found are quickly killed; the others 2247Buffers in which no match is found are quickly killed; the others
2253continue to exist. 2248continue to exist.
2254 2249
2255 It may have struck you that @code{tags-search} is a lot like 2250 As an alternative to @code{tags-search}, you can run @command{grep}
2256@code{grep}. You can also run @code{grep} itself as an inferior of 2251as a subprocess and have Emacs show you the matching lines one by one.
2257Emacs and have Emacs show you the matching lines one by one.
2258@xref{Grep Searching}. 2252@xref{Grep Searching}.
2259 2253
2260@node List Tags 2254@node List Tags
2261@subsection Tags Table Inquiries 2255@subsection Tags Table Inquiries
2262 2256
2263@table @kbd 2257@table @kbd
2258@item C-M-i
2259@itemx M-@key{TAB}
2260Perform completion on the text around point, using the selected tags
2261table if one is loaded (@code{completion-at-point}).
2264@item M-x list-tags @key{RET} @var{file} @key{RET} 2262@item M-x list-tags @key{RET} @var{file} @key{RET}
2265Display a list of the tags defined in the program file @var{file}. 2263Display a list of the tags defined in the program file @var{file}.
2266@item M-x tags-apropos @key{RET} @var{regexp} @key{RET} 2264@item M-x tags-apropos @key{RET} @var{regexp} @key{RET}
2267Display a list of all tags matching @var{regexp}. 2265Display a list of all tags matching @var{regexp}.
2268@end table 2266@end table
2269 2267
2268@cindex completion (symbol names)
2269 In most programming language modes, you can type @kbd{C-M-i} or
2270@kbd{M-@key{TAB}} (@code{completion-at-point}) to complete the symbol
2271at point. If there is a selected tags table, this command can use it
2272to generate completion candidates. @xref{Symbol Completion}.
2273
2270@findex list-tags 2274@findex list-tags
2271 @kbd{M-x list-tags} reads the name of one of the files described by 2275 @kbd{M-x list-tags} reads the name of one of the files covered by
2272the selected tags table, and displays a list of all the tags defined in 2276the selected tags table, and displays a list of tags defined in that
2273that file. The ``file name'' argument is really just a string to 2277file. Do not include a directory as part of the file name unless the
2274compare against the file names recorded in the tags table; it is read as 2278file name recorded in the tags table includes a directory.
2275a string rather than as a file name. Therefore, completion and
2276defaulting are not available, and you must enter the file name the same
2277way it appears in the tags table. Do not include a directory as part of
2278the file name unless the file name recorded in the tags table includes a
2279directory.
2280 2279
2281@findex tags-apropos 2280@findex tags-apropos
2282@vindex tags-apropos-verbose 2281@vindex tags-apropos-verbose
2283 @kbd{M-x tags-apropos} is like @code{apropos} for tags
2284(@pxref{Apropos}). It finds all the tags in the selected tags table
2285whose entries match @var{regexp}, and displays them. If the variable
2286@code{tags-apropos-verbose} is non-@code{nil}, it displays the names
2287of the tags files together with the tag names.
2288
2289@vindex tags-tag-face 2282@vindex tags-tag-face
2290@vindex tags-apropos-additional-actions 2283@vindex tags-apropos-additional-actions
2291 You can customize the appearance of the output by setting the 2284 @kbd{M-x tags-apropos} is like @code{apropos} for tags
2292variable @code{tags-tag-face} to a face. You can display additional 2285(@pxref{Apropos}). It displays a list of tags in the selected tags
2293output with @kbd{M-x tags-apropos} by customizing the variable 2286table whose entries match @var{regexp}. If the variable
2294@code{tags-apropos-additional-actions}---see its documentation for 2287@code{tags-apropos-verbose} is non-@code{nil}, it displays the names
2295details. 2288of the tags files together with the tag names. You can customize the
2296 2289appearance of the output by setting the variable @code{tags-tag-face}
2297 You can also use the collection of tag names to complete a symbol 2290to a face. You can display additional output by customizing the
2298name in the buffer. @xref{Symbol Completion}. 2291variable @code{tags-apropos-additional-actions}; see its documentation
2299 2292for details.
2300 You can use @kbd{M-x next-file} to visit the files in the selected 2293
2301tags table. The first time this command is called, it visits the 2294@findex next-file
2302first file in the tags table. Each subsequent call visits the next 2295 @kbd{M-x next-file} visits files covered by the selected tags table.
2303file in the table, unless a prefix argument is supplied, in which case 2296The first time it is called, it visits the first file covered by the
2304it returns to the first file. 2297table. Each subsequent call visits the next covered file, unless a
2298prefix argument is supplied, in which case it returns to the first
2299file.
2305 2300
2306@node EDE 2301@node EDE
2307@section Emacs Development Environment 2302@section Emacs Development Environment
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index e2051a93c60..7301ecfea8a 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -1291,18 +1291,18 @@ for switching graphical windows, so you should type @kbd{C-M-i} or
1291@kbd{@key{ESC} @key{TAB}} instead. 1291@kbd{@key{ESC} @key{TAB}} instead.
1292 1292
1293@cindex tags-based completion 1293@cindex tags-based completion
1294 In-buffer symbol completion generates its completion list in a 1294@findex completion-at-point
1295number of different ways. If Semantic mode is enabled, Emacs tries to
1296use the Semantic parser data for completion (@pxref{Semantic}). If
1297Semantic mode is not enabled or it fails at performing completion,
1298Emacs normally tries to complete using a tags table (@pxref{Tags}).
1299
1300@cindex Lisp symbol completion 1295@cindex Lisp symbol completion
1301@cindex completion (Lisp symbols) 1296@cindex completion (Lisp symbols)
1302 In Emacs Lisp mode, completion is performed using the function, 1297 In most programming language modes, @kbd{C-M-i} (or
1303variable, and property names defined in the current Emacs session. If 1298@kbd{M-@key{TAB}}) invokes the command @code{completion-at-point},
1304there is an open parenthesis immediately before the beginning of the 1299which generates its completion list in a flexible way. If Semantic
1305partial symbol, only symbols with function definitions are considered. 1300mode is enabled, it tries to use the Semantic parser data for
1301completion (@pxref{Semantic}). If Semantic mode is not enabled or
1302fails at performing completion, it tries to complete using the
1303selected tags table (@pxref{Tags}). If in Emacs Lisp mode, it
1304performs completion using the function, variable, or property names
1305defined in the current Emacs session.
1306 1306
1307 In all other respects, in-buffer symbol completion behaves like 1307 In all other respects, in-buffer symbol completion behaves like
1308minibuffer completion. For instance, if Emacs cannot complete to a 1308minibuffer completion. For instance, if Emacs cannot complete to a
diff --git a/doc/emacs/vc1-xtra.texi b/doc/emacs/vc1-xtra.texi
index 8df5bfbd551..b65e6f96a6e 100644
--- a/doc/emacs/vc1-xtra.texi
+++ b/doc/emacs/vc1-xtra.texi
@@ -12,8 +12,7 @@
12 12
13@menu 13@menu
14* Change Logs and VC:: Generating a change log file from log entries. 14* Change Logs and VC:: Generating a change log file from log entries.
15* Renaming and VC:: A command to rename both the source and master 15* VC Delete/Rename:: Deleting and renaming version-controlled files.
16 file correctly.
17* Revision Tags:: Symbolic names for revisions. 16* Revision Tags:: Symbolic names for revisions.
18* Version Headers:: Inserting version control headers into working files. 17* Version Headers:: Inserting version control headers into working files.
19@end menu 18@end menu
@@ -104,33 +103,48 @@ same author at nearly the same time. If the log entries for several
104such files all have the same text, it coalesces them into a single 103such files all have the same text, it coalesces them into a single
105entry. 104entry.
106 105
107@node Renaming and VC 106@node VC Delete/Rename
108@subsubsection Renaming VC Work Files and Master Files 107@subsubsection Deleting and Renaming Version-Controlled Files
109@cindex renaming version-controlled files 108@cindex renaming version-controlled files
110 109
111@table @kbd 110@table @kbd
111@item M-x vc-delete-file
112Prompt for a file name, delete the file from the working tree, and
113schedule the deletion for committing.
114
112@item M-x vc-rename-file 115@item M-x vc-rename-file
113Prompt for two file names, @var{VAR} and @var{OLD}, and rename them in 116Prompt for two file names, @var{VAR} and @var{OLD}, rename them in the
114the version-controlled working tree. 117working tree, and schedule the renaming for committing.
115@end table 118@end table
116 119
117@findex vc-rename-file 120@findex vc-delete-file
118 If you wish to rename a registered file in a version-controlled 121 If you wish to delete a version-controlled file, use the command
119working tree, use the command @kbd{M-x vc-rename-file}. This prompts 122@kbd{M-x vc-delete-file}. This prompts for the file name, and deletes
120for two arguments: the file you wish to rename, followed by the new 123it via the version control system. The file is removed from the
121name; then it performs the renaming through the version control 124working tree, and in the VC Directory buffer
122system. 125@iftex
126(@pxref{VC Directory Mode}),
127@end iftex
128@ifnottex
129(@pxref{VC Directory Mode}),
130@end ifnottex
131it is displayed with the @samp{removed} status. When you commit it,
132the deletion takes effect in the repository.
123 133
124 On modern version control systems that have built-in support for 134@findex vc-rename-file
125renaming, the renaming operation takes effect immediately in the 135 To rename a version-controlled file, type @kbd{M-x vc-rename-file}.
136This prompts for two arguments: the name of the file you wish to
137rename, and the new name; then it performs the renaming via the
138version control system. The renaming takes effect immediately in the
126working tree, and takes effect in the repository when you commit the 139working tree, and takes effect in the repository when you commit the
127renamed file. The renamed file retains the full change history of the 140renamed file.
128original file.
129 141
130 On CVS and older version control systems, the @code{vc-rename-file} 142 On modern version control systems that have built-in support for
131command actually works by creating a copy of the old file under the 143renaming, the renamed file retains the full change history of the
132new name, registering it, and deleting the old file. In this case, 144original file. On CVS and older version control systems, the
133the change history is not preserved. 145@code{vc-rename-file} command actually works by creating a copy of the
146old file under the new name, registering it, and deleting the old
147file. In this case, the change history is not preserved.
134 148
135@node Revision Tags 149@node Revision Tags
136@subsubsection Revision Tags 150@subsubsection Revision Tags
diff --git a/etc/NEWS b/etc/NEWS
index 5e274f987e5..95d1854744b 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -97,10 +97,10 @@ and also when HOME is set to C:\ by default.
97** Completion 97** Completion
98 98
99*** shell-mode uses pcomplete rules, with the standard completion UI. 99*** shell-mode uses pcomplete rules, with the standard completion UI.
100 100+++
101*** Many packages have been changed to use `completion-at-point' 101*** Many packages have been changed to use `completion-at-point'
102rather than their own completion code. 102rather than their own completion code.
103 103+++
104*** `completion-at-point' now handles tags and semantic completion. 104*** `completion-at-point' now handles tags and semantic completion.
105--- 105---
106*** Completion in a non-minibuffer now tries to detect the end of completion 106*** Completion in a non-minibuffer now tries to detect the end of completion