diff options
| author | Chong Yidong | 2011-12-25 22:16:00 +0800 |
|---|---|---|
| committer | Chong Yidong | 2011-12-25 22:16:00 +0800 |
| commit | 3d992aa0700903718a0f3d0d2be1b6879878f2b9 (patch) | |
| tree | 9bb0e3d156bf341b48f3b000697bb59d2dc3cdf9 | |
| parent | 2170cb536dd1b4860618bf4ab7f1311c0d35e5a3 (diff) | |
| download | emacs-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-RELEASE | 6 | ||||
| -rw-r--r-- | doc/emacs/ChangeLog | 16 | ||||
| -rw-r--r-- | doc/emacs/emacs.texi | 5 | ||||
| -rw-r--r-- | doc/emacs/files.texi | 13 | ||||
| -rw-r--r-- | doc/emacs/maintaining.texi | 303 | ||||
| -rw-r--r-- | doc/emacs/programs.texi | 20 | ||||
| -rw-r--r-- | doc/emacs/vc1-xtra.texi | 54 | ||||
| -rw-r--r-- | etc/NEWS | 4 |
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 | |||
| 153 | killing.texi cyd | 153 | killing.texi cyd |
| 154 | kmacro.texi cyd | 154 | kmacro.texi cyd |
| 155 | macos.texi | 155 | macos.texi |
| 156 | maintaining.texi | 156 | maintaining.texi cyd |
| 157 | major.texi | 157 | major.texi |
| 158 | mark.texi cyd | 158 | mark.texi cyd |
| 159 | mini.texi | 159 | mini.texi |
| @@ -172,8 +172,8 @@ search.texi cyd | |||
| 172 | sending.texi | 172 | sending.texi |
| 173 | text.texi cyd | 173 | text.texi cyd |
| 174 | trouble.texi | 174 | trouble.texi |
| 175 | vc-xtra.texi | 175 | vc-xtra.texi cyd |
| 176 | vc1-xtra.texi | 176 | vc1-xtra.texi cyd |
| 177 | windows.texi cyd | 177 | windows.texi cyd |
| 178 | xresources.texi | 178 | xresources.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 @@ | |||
| 1 | 2011-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 | |||
| 1 | 2011-12-22 Chong Yidong <cyd@gnu.org> | 17 | 2011-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 | |||
| 782 | Miscellaneous Commands and Features of VC | 782 | Miscellaneous 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 | ||
| 790 | Customizing VC | 789 | Customizing 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 | |||
| 1485 | them delete outright, instead of using the Trash, regardless of | 1485 | them 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 | ||
| 1490 | should delete it using @kbd{M-x vc-delete-file} instead of @kbd{M-x | ||
| 1491 | delete-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 | |||
| 1514 | ask for confirmation when the new file name already exists, too. | 1520 | ask 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 |
| 1518 | Control}), you normally ought to rename it via the version control | 1524 | should rename it using @kbd{M-x vc-rename-file} instead of @kbd{M-x |
| 1519 | system instead, using @kbd{M-x vc-rename-file}. @xref{Renaming and | 1525 | rename-file}. @xref{VC Delete/Rename}. |
| 1520 | VC}. | ||
| 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 | |||
| 1188 | active, unmark all the files in the region (@code{vc-dir-unmark}). | 1188 | active, unmark all the files in the region (@code{vc-dir-unmark}). |
| 1189 | 1189 | ||
| 1190 | @item U | 1190 | @item U |
| 1191 | If point is on a file entry, umark all files with the same status; if | 1191 | If point is on a file entry, unmark all files with the same status; if |
| 1192 | point is on a directory entry, unmark all files in that directory tree | 1192 | point 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 |
| 1194 | files and directories. | 1194 | files 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 |
| 1570 | document. In program source code, tags reference syntactic elements | 1570 | document. In source code, tags reference syntactic elements of the |
| 1571 | of the program: functions, subroutines, data types, macros, etc. In a | 1571 | program: functions, subroutines, data types, macros, etc. In a |
| 1572 | document, tags reference chapters, sections, appendices, etc. Each | 1572 | document, tags reference chapters, sections, appendices, etc. Each |
| 1573 | tag specifies the name of the file where the corresponding subunit is | 1573 | tag specifies the name of the file where the corresponding subunit is |
| 1574 | defined, and the position of the subunit's definition in that file. | 1574 | defined, 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 | |||
| 1582 | C files; and Fortran files produced by preprocessing @file{.fpp} | 1582 | C files; and Fortran files produced by preprocessing @file{.fpp} |
| 1583 | source files. | 1583 | source files. |
| 1584 | 1584 | ||
| 1585 | To produce a tags table, you use the @samp{etags} command, | 1585 | @cindex etags |
| 1586 | submitting 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 | 1587 | on a document or the source code file. The @samp{etags} program |
| 1588 | file} in short. The conventional name for a tags file is @file{TAGS}. | 1588 | writes the tags to a @dfn{tags table file}, or @dfn{tags file} in |
| 1589 | short. 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 |
| 1591 | search or replace through multiple source files: these commands use | 1593 | information recorded in tags tables. For instance, the @kbd{M-.} |
| 1592 | the 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 |
| 1593 | files to search. Other commands, such as @kbd{M-.}, which finds the | 1595 | definition in its source file. @xref{Find Tag}. |
| 1594 | definition of a function, use the recorded information about the | ||
| 1595 | function names and positions to find the source file and the position | ||
| 1596 | within 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}. | 1602 | tailored for C++. @xref{Top,, Ebrowse, ebrowse, Ebrowse User's |
| 1603 | Manual}. The Semantic package provides another way to generate and | ||
| 1604 | use 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 | ||
| 1632 | You can tag function declarations and external variables in addition | 1634 | You can tag function declarations and external variables in addition |
| 1633 | to function definitions by giving the @samp{--declarations} option to | 1635 | to function definitions by giving the @samp{--declarations} option to |
| 1634 | @code{etags}. | 1636 | @command{etags}. |
| 1635 | 1637 | ||
| 1636 | @item | 1638 | @item |
| 1637 | In C++ code, in addition to all the tag constructs of C code, member | 1639 | In 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 |
| 1651 | In La@TeX{} text, the argument of any of the commands @code{\chapter}, | 1653 | In 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 | ||
| 1658 | Other commands can make tags as well, if you specify them in the | 1660 | Other commands can make tags as well, if you specify them in the |
| 1659 | environment variable @env{TEXTAGS} before invoking @code{etags}. The | 1661 | environment variable @env{TEXTAGS} before invoking @command{etags}. The |
| 1660 | value of this environment variable should be a colon-separated list of | 1662 | value of this environment variable should be a colon-separated list of |
| 1661 | command names. For example, | 1663 | command 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 |
| 1794 | the syntax of several languages, as described in | 1796 | the syntax of several languages, as described in |
| 1795 | @iftex | 1797 | @iftex |
| 1796 | the previous section. | 1798 | the 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 |
| 1801 | Here is how to run @code{etags}: | 1803 | Here is how to run @command{etags}: |
| 1802 | 1804 | ||
| 1803 | @example | 1805 | @example |
| 1804 | etags @var{inputfiles}@dots{} | 1806 | etags @var{inputfiles}@dots{} |
| 1805 | @end example | 1807 | @end example |
| 1806 | 1808 | ||
| 1807 | @noindent | 1809 | @noindent |
| 1808 | The @code{etags} program reads the specified files, and writes a tags | 1810 | The @command{etags} program reads the specified files, and writes a tags |
| 1809 | table named @file{TAGS} in the current working directory. You can | 1811 | table named @file{TAGS} in the current working directory. You can |
| 1810 | optionally specify a different file name for the tags table by using the | 1812 | optionally 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 |
| 1812 | prints the tags table to standard output. | 1814 | prints 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 |
| 1815 | compressed versions of them and uncompresses them to read them. Under | 1817 | compressed versions of them and uncompresses them to read them. Under |
| 1816 | MS-DOS, @code{etags} also looks for file names like @file{mycode.cgz} | 1818 | MS-DOS, @command{etags} also looks for file names like @file{mycode.cgz} |
| 1817 | if it is given @samp{mycode.c} on the command line and @file{mycode.c} | 1819 | if it is given @samp{mycode.c} on the command line and @file{mycode.c} |
| 1818 | does not exist. | 1820 | does 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 |
| 1821 | its file name and contents. You can specify the language with the | 1823 | described in it, you can update it by running the @command{etags} |
| 1822 | @samp{--language=@var{name}} option, described below. | 1824 | program again. If the tags table does not record a tag, or records it |
| 1823 | 1825 | for 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 | 1826 | definition until you update the tags table. But if the position |
| 1825 | described in the table, the way to update the tags table is the same | 1827 | recorded in the tags table becomes a little bit wrong (due to other |
| 1826 | way it was made in the first place. If the tags table fails to record | 1828 | editing), Emacs will still be able to find the right position, with a |
| 1827 | a tag, or records it for the wrong file, then Emacs cannot possibly | 1829 | slight delay. |
| 1828 | find its definition until you update the tags table. However, if the | ||
| 1829 | position recorded in the tags table becomes a little bit wrong (due to | ||
| 1830 | other editing), the worst consequence is a slight delay in finding the | ||
| 1831 | tag. Even if the stored position is very far wrong, Emacs will still | ||
| 1832 | find the tag, after searching most of the file for it. That delay is | ||
| 1833 | hardly 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. |
| 1836 | You should update a tags table when you define new tags that you want | 1832 | You should update a tags table when you define new tags that you want |
| 1837 | to have listed, or when you move tag definitions from one file to | 1833 | to have listed, or when you move tag definitions from one file to |
| 1838 | another, or when changes become substantial. | 1834 | another, 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 |
| 1841 | tags file name with the @samp{--include=@var{file}} option when | 1837 | passing the @samp{--include=@var{file}} option to @command{etags}. It |
| 1842 | creating the file that is to include it. The latter file then acts as | 1838 | then covers all the files covered by the included tags file, as well |
| 1843 | if it covered all the source files specified in the included file, as | 1839 | as its own. |
| 1844 | well 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 |
| 1848 | directory where the tags file was initially written. This way, you can | 1843 | directory where the tags file was initially written. This way, you can |
| 1849 | move an entire directory tree containing both the tags file and the | 1844 | move an entire directory tree containing both the tags file and the |
| 1850 | source files, and the tags file will still refer correctly to the source | 1845 | source 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}. | |||
| 1857 | pointing to a tags file in a different directory, because this would | 1852 | pointing to a tags file in a different directory, because this would |
| 1858 | generally render the file names invalid. | 1853 | generally 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 |
| 1861 | the tags file will contain absolute file names. This way, the tags file | 1856 | the tags file will contain absolute file names. This way, the tags file |
| 1862 | will still refer to the same files even if you move it, as long as the | 1857 | will still refer to the same files even if you move it, as long as the |
| 1863 | source files remain in the same place. Absolute file names start with | 1858 | source 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, |
| 1867 | may have problems listing them on the command line, because some systems | 1862 | you may have problems listing them on the command line, because some |
| 1868 | have a limit on its length. The simplest way to circumvent this limit | 1863 | systems have a limit on its length. You can circumvent this limit by |
| 1869 | is to tell @code{etags} to read the file names from its standard input, | 1864 | telling @command{etags} to read the file names from its standard |
| 1870 | by typing a dash in place of the file names, like this: | 1865 | input, by typing a dash in place of the file names, like this: |
| 1871 | 1866 | ||
| 1872 | @smallexample | 1867 | @smallexample |
| 1873 | find . -name "*.[chCH]" -print | etags - | 1868 | find . -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 |
| 1877 | explicitly. You can intermix these options with file names; each one | 1872 | on its file name and contents. You can specify the language |
| 1878 | applies to the file names that follow it. Specify | 1873 | explicitly with the @samp{--language=@var{name}} option. You can |
| 1879 | @samp{--language=auto} to tell @code{etags} to resume guessing the | 1874 | intermix these options with file names; each one applies to the file |
| 1880 | language from the file names and file contents. Specify | 1875 | names 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 |
| 1882 | entirely; then @code{etags} recognizes tags by regexp matching alone | 1877 | and file contents. Specify @samp{--language=none} to turn off |
| 1883 | (@pxref{Etags Regexps}). | 1878 | language-specific processing entirely; then @command{etags} recognizes |
| 1879 | tags 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 |
| 1886 | calling @code{etags} from programs. It can be used (only once) in | 1882 | calling @command{etags} from programs. It can be used (only once) in |
| 1887 | place of a file name on the command line. @code{Etags} will read from | 1883 | place of a file name on the command line. @command{etags} will read from |
| 1888 | standard input and mark the produced tags as belonging to the file | 1884 | standard 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} |
| 1892 | knows, and the file name rules for guessing the language. It also prints | 1888 | knows, and the file name rules for guessing the language. It also prints |
| 1893 | a list of all the available @code{etags} options, together with a short | 1889 | a list of all the available @command{etags} options, together with a short |
| 1894 | explanation. If followed by one or more @samp{--language=@var{lang}} | 1890 | explanation. If followed by one or more @samp{--language=@var{lang}} |
| 1895 | options, it outputs detailed information about how tags are generated for | 1891 | options, 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 |
| 1902 | based on regexp matching. You can freely intermix this option with | 1898 | recognized by regular expression matching. You can intermix this |
| 1903 | file names, and each one applies to the source files that follow it. | 1899 | option with file names; each one applies to the source files that |
| 1904 | If you specify multiple @samp{--regex} options, all of them are used | 1900 | follow it. If you specify multiple @samp{--regex} options, all of |
| 1905 | in parallel. The syntax is: | 1901 | them 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 |
| 1912 | regexp for matching tags. It is always used anchored, that is, it | 1908 | The essential part of the option value is @var{tagregexp}, the regexp |
| 1913 | only matches at the beginning of a line. If you want to allow | 1909 | for matching tags. It is always used anchored, that is, it only |
| 1914 | indented tags, use a regexp that matches initial whitespace; start it | 1910 | matches at the beginning of a line. If you want to allow indented |
| 1915 | with @samp{[ \t]*}. | 1911 | tags, 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 |
| 1918 | all the GCC character escape sequences are supported (@samp{\a} for | 1915 | all 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 | |||
| 1929 | below. | 1926 | below. |
| 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 |
| 1932 | modify the way @code{etags} does the matching. A regexp with no | 1929 | modify the way @command{etags} does the matching. A regexp with no |
| 1933 | modifiers is applied sequentially to each line of the input file, in a | 1930 | modifiers is applied sequentially to each line of the input file, in a |
| 1934 | case-sensitive way. The modifiers and their meanings are: | 1931 | case-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 |
| 1957 | Here @code{etags} chooses the parsing language for @file{voo.doo} and | 1954 | Here @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, |
| 1964 | permitting multi-line matches, in a case-sensitive way. @code{etags} | 1961 | permitting multi-line matches, in a case-sensitive way. @command{etags} |
| 1965 | uses only the Lisp tags rules, with no user-specified regexp matching, | 1962 | uses only the Lisp tags rules, with no user-specified regexp matching, |
| 1966 | to recognize tags in @file{los.er}. | 1963 | to 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 |
| 1969 | given language by using the optional prefix @var{@{language@}}. | 1966 | given 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 |
| 1972 | predefined regular expressions for @code{etags} in a file. The | 1969 | predefined regular expressions for @command{etags} in a file. The |
| 1973 | following example tags the @code{DEFVAR} macros in the Emacs source | 1970 | following example tags the @code{DEFVAR} macros in the Emacs source |
| 1974 | files, for the C language only: | 1971 | files, for the C language only: |
| 1975 | 1972 | ||
| @@ -1979,7 +1976,7 @@ files, for the C language only: | |||
| 1979 | 1976 | ||
| 1980 | @noindent | 1977 | @noindent |
| 1981 | When you have complex regular expressions, you can store the list of | 1978 | When you have complex regular expressions, you can store the list of |
| 1982 | them in a file. The following option syntax instructs @code{etags} to | 1979 | them in a file. The following option syntax instructs @command{etags} to |
| 1983 | read two files of regular expressions. The regular expressions | 1980 | read two files of regular expressions. The regular expressions |
| 1984 | contained in the second file are matched without regard to case. | 1981 | contained 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 |
| 1991 | A regex file for @code{etags} contains one regular expression per | 1988 | A regex file for @command{etags} contains one regular expression per |
| 1992 | line. Empty lines, and lines beginning with space or tab are ignored. | 1989 | line. Empty lines, and lines beginning with space or tab are ignored. |
| 1993 | When the first character in a line is @samp{@@}, @code{etags} assumes | 1990 | When the first character in a line is @samp{@@}, @command{etags} assumes |
| 1994 | that the rest of the line is the name of another file of regular | 1991 | that the rest of the line is the name of another file of regular |
| 1995 | expressions; thus, one such file can include another file. All the | 1992 | expressions; thus, one such file can include another file. All the |
| 1996 | other lines are taken to be regular expressions. If the first | 1993 | other 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 |
| 2059 | commands for working with tags tables use the selected one. To select | 2055 | commands for working with tags tables use the selected one. To select |
| 2060 | a tags table, type @kbd{M-x visit-tags-table}, which reads the tags | 2056 | a tags table, type @kbd{M-x visit-tags-table}, which reads the tags |
| 2061 | table file name as an argument, with @file{TAGS} in the default | 2057 | table file name as an argument, with @file{TAGS} in the default |
| 2062 | directory as the default. | 2058 | directory 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 |
| 2065 | try to use them; all @code{visit-tags-table} does is store the file | 2062 | try to use them; all @code{visit-tags-table} does is store the file |
| 2066 | name in the variable @code{tags-file-name}, and setting the variable | 2063 | name 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 |
| 2128 | a specified tag. It searches through the tags table for that tag, as a | 2125 | its source definition. It works by searching through the tags table |
| 2129 | string, and then uses the tags table info to determine the file that the | 2126 | for that tag's file and approximate character position, visiting that |
| 2130 | definition is in and the approximate character position in the file of | 2127 | file, and searching for the tag definition at ever-increasing |
| 2131 | the definition. Then @code{find-tag} visits that file, moves point to | 2128 | distances away from the recorded approximate position. |
| 2132 | the approximate character position, and searches ever-increasing | 2129 | |
| 2133 | distances away to find the tag definition. | 2130 | When entering the tag argument to @kbd{M-.}, the usual minibuffer |
| 2134 | 2131 | completion commands can be used (@pxref{Completion}), with the tag | |
| 2135 | If an empty argument is given (just type @key{RET}), the balanced | 2132 | names in the selected tags table as completion candidates. If you |
| 2136 | expression in the buffer before or around point is used as the | 2133 | specify an empty argument, the balanced expression in the buffer |
| 2137 | @var{tag} argument. @xref{Expressions}. | 2134 | before 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 |
| 2140 | will do. This is because @kbd{M-.} finds tags in the table which | 2137 | will do. @kbd{M-.} finds tags which contain that argument as a |
| 2141 | contain @var{tag} as a substring. However, it prefers an exact match | 2138 | substring. However, it prefers an exact match to a substring match. |
| 2142 | to a substring match. To find other tags that match the same | 2139 | To find other tags that match the same substring, give @code{find-tag} |
| 2143 | substring, give @code{find-tag} a numeric argument, as in @kbd{C-u | 2140 | a numeric argument, as in @kbd{C-u M-.} or @kbd{M-0 M-.}; this does |
| 2144 | M-.}; this does not read a tag name, but continues searching the tags | 2141 | not read a tag name, but continues searching the tags table's text for |
| 2145 | table's text for another tag containing the same substring last used. | 2142 | another tag containing the same substring last used. |
| 2146 | If you have a real @key{META} key, @kbd{M-0 M-.}@: is an easier | ||
| 2147 | alternative 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 |
| 2154 | variant that displays the new buffer in another window, and one that | 2149 | variant that displays the new buffer in another window, and one that |
| 2155 | makes a new frame for it. The former is @w{@kbd{C-x 4 .}}, which invokes | 2150 | makes a new frame for it. The former is @w{@kbd{C-x 4 .}} |
| 2156 | the 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 .}} |
| 2157 | which 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 |
| 2160 | M-.}; more generally, @kbd{M-.} with a negative numeric argument. This | 2155 | generally, @kbd{M-.} with a negative numeric argument. Similarly, |
| 2161 | command 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 |
| 2162 | argument finds the previous tag location in another window. | 2157 | location 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 |
| 2168 | back to places @emph{from where} you found them. Use @kbd{M-*}, which | 2163 | go back to places @emph{from where} you found them, using @kbd{M-*} |
| 2169 | invokes the command @code{pop-tag-mark}, for this. Typically you would | 2164 | (@code{pop-tag-mark}). Thus you can find and examine the definition |
| 2170 | find and study the definition of something with @kbd{M-.} and then | 2165 | of something with @kbd{M-.} and then return to where you were with |
| 2171 | return 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 |
| 2174 | a depth determined by the variable @code{find-tag-marker-ring-length}. | 2169 | a 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. |
| 2216 | one more match, type @kbd{M-,} (@code{tags-loop-continue}) to resume the | 2211 | Type @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 |
| 2218 | by the remaining files of the tags table.@refill | 2213 | the 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). | |||
| 2252 | Buffers in which no match is found are quickly killed; the others | 2247 | Buffers in which no match is found are quickly killed; the others |
| 2253 | continue to exist. | 2248 | continue 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 | 2251 | as a subprocess and have Emacs show you the matching lines one by one. |
| 2257 | Emacs 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} | ||
| 2260 | Perform completion on the text around point, using the selected tags | ||
| 2261 | table 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} |
| 2265 | Display a list of the tags defined in the program file @var{file}. | 2263 | Display 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} |
| 2267 | Display a list of all tags matching @var{regexp}. | 2265 | Display 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 | ||
| 2271 | at point. If there is a selected tags table, this command can use it | ||
| 2272 | to 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 |
| 2272 | the selected tags table, and displays a list of all the tags defined in | 2276 | the selected tags table, and displays a list of tags defined in that |
| 2273 | that file. The ``file name'' argument is really just a string to | 2277 | file. Do not include a directory as part of the file name unless the |
| 2274 | compare against the file names recorded in the tags table; it is read as | 2278 | file name recorded in the tags table includes a directory. |
| 2275 | a string rather than as a file name. Therefore, completion and | ||
| 2276 | defaulting are not available, and you must enter the file name the same | ||
| 2277 | way it appears in the tags table. Do not include a directory as part of | ||
| 2278 | the file name unless the file name recorded in the tags table includes a | ||
| 2279 | directory. | ||
| 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 | ||
| 2285 | whose entries match @var{regexp}, and displays them. If the variable | ||
| 2286 | @code{tags-apropos-verbose} is non-@code{nil}, it displays the names | ||
| 2287 | of 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 |
| 2292 | variable @code{tags-tag-face} to a face. You can display additional | 2285 | (@pxref{Apropos}). It displays a list of tags in the selected tags |
| 2293 | output with @kbd{M-x tags-apropos} by customizing the variable | 2286 | table 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 |
| 2295 | details. | 2288 | of the tags files together with the tag names. You can customize the |
| 2296 | 2289 | appearance 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 | 2290 | to a face. You can display additional output by customizing the |
| 2298 | name in the buffer. @xref{Symbol Completion}. | 2291 | variable @code{tags-apropos-additional-actions}; see its documentation |
| 2299 | 2292 | for details. | |
| 2300 | You can use @kbd{M-x next-file} to visit the files in the selected | 2293 | |
| 2301 | tags table. The first time this command is called, it visits the | 2294 | @findex next-file |
| 2302 | first 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. |
| 2303 | file in the table, unless a prefix argument is supplied, in which case | 2296 | The first time it is called, it visits the first file covered by the |
| 2304 | it returns to the first file. | 2297 | table. Each subsequent call visits the next covered file, unless a |
| 2298 | prefix argument is supplied, in which case it returns to the first | ||
| 2299 | file. | ||
| 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 |
| 1295 | number of different ways. If Semantic mode is enabled, Emacs tries to | ||
| 1296 | use the Semantic parser data for completion (@pxref{Semantic}). If | ||
| 1297 | Semantic mode is not enabled or it fails at performing completion, | ||
| 1298 | Emacs 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 |
| 1303 | variable, and property names defined in the current Emacs session. If | 1298 | @kbd{M-@key{TAB}}) invokes the command @code{completion-at-point}, |
| 1304 | there is an open parenthesis immediately before the beginning of the | 1299 | which generates its completion list in a flexible way. If Semantic |
| 1305 | partial symbol, only symbols with function definitions are considered. | 1300 | mode is enabled, it tries to use the Semantic parser data for |
| 1301 | completion (@pxref{Semantic}). If Semantic mode is not enabled or | ||
| 1302 | fails at performing completion, it tries to complete using the | ||
| 1303 | selected tags table (@pxref{Tags}). If in Emacs Lisp mode, it | ||
| 1304 | performs completion using the function, variable, or property names | ||
| 1305 | defined 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 |
| 1308 | minibuffer completion. For instance, if Emacs cannot complete to a | 1308 | minibuffer 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 | |||
| 104 | such files all have the same text, it coalesces them into a single | 103 | such files all have the same text, it coalesces them into a single |
| 105 | entry. | 104 | entry. |
| 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 | ||
| 112 | Prompt for a file name, delete the file from the working tree, and | ||
| 113 | schedule the deletion for committing. | ||
| 114 | |||
| 112 | @item M-x vc-rename-file | 115 | @item M-x vc-rename-file |
| 113 | Prompt for two file names, @var{VAR} and @var{OLD}, and rename them in | 116 | Prompt for two file names, @var{VAR} and @var{OLD}, rename them in the |
| 114 | the version-controlled working tree. | 117 | working 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 |
| 119 | working 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 |
| 120 | for two arguments: the file you wish to rename, followed by the new | 123 | it via the version control system. The file is removed from the |
| 121 | name; then it performs the renaming through the version control | 124 | working tree, and in the VC Directory buffer |
| 122 | system. | 125 | @iftex |
| 126 | (@pxref{VC Directory Mode}), | ||
| 127 | @end iftex | ||
| 128 | @ifnottex | ||
| 129 | (@pxref{VC Directory Mode}), | ||
| 130 | @end ifnottex | ||
| 131 | it is displayed with the @samp{removed} status. When you commit it, | ||
| 132 | the 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 |
| 125 | renaming, the renaming operation takes effect immediately in the | 135 | To rename a version-controlled file, type @kbd{M-x vc-rename-file}. |
| 136 | This prompts for two arguments: the name of the file you wish to | ||
| 137 | rename, and the new name; then it performs the renaming via the | ||
| 138 | version control system. The renaming takes effect immediately in the | ||
| 126 | working tree, and takes effect in the repository when you commit the | 139 | working tree, and takes effect in the repository when you commit the |
| 127 | renamed file. The renamed file retains the full change history of the | 140 | renamed file. |
| 128 | original 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 |
| 131 | command actually works by creating a copy of the old file under the | 143 | renaming, the renamed file retains the full change history of the |
| 132 | new name, registering it, and deleting the old file. In this case, | 144 | original file. On CVS and older version control systems, the |
| 133 | the change history is not preserved. | 145 | @code{vc-rename-file} command actually works by creating a copy of the |
| 146 | old file under the new name, registering it, and deleting the old | ||
| 147 | file. 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 |
| @@ -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' |
| 102 | rather than their own completion code. | 102 | rather 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 |