diff options
| author | Eli Zaretskii | 2016-05-24 21:24:45 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2016-05-24 21:24:45 +0300 |
| commit | 2e589c00422e68624024c8a77799d54964e7b3a2 (patch) | |
| tree | fb62c22debba448b181a109ad4f11ebd93b0feb4 | |
| parent | f3d2dedeba37d899be72a37339d0370aa3ae4c70 (diff) | |
| download | emacs-2e589c00422e68624024c8a77799d54964e7b3a2.tar.gz emacs-2e589c00422e68624024c8a77799d54964e7b3a2.zip | |
Fix cross-references between manuals
* doc/misc/viper.texi (Viper Specials):
* doc/misc/url.texi (Tramp):
* doc/misc/sem-user.texi (Smart Jump):
* doc/lispintro/emacs-lisp-intro.texi (Finding More):
* doc/misc/efaq.texi (Replacing text across multiple files): Fix
cross-references between manuals. (Bug#23612)
* doc/lispintro/emacs-lisp-intro.texi (etags): Node deleted: no
longer relevant to Emacs Lisp programming.
| -rw-r--r-- | doc/lispintro/emacs-lisp-intro.texi | 189 | ||||
| -rw-r--r-- | doc/misc/efaq.texi | 4 | ||||
| -rw-r--r-- | doc/misc/sem-user.texi | 6 | ||||
| -rw-r--r-- | doc/misc/url.texi | 4 | ||||
| -rw-r--r-- | doc/misc/viper.texi | 2 |
5 files changed, 23 insertions, 182 deletions
diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index eea46af6b19..10162b35467 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi | |||
| @@ -584,7 +584,6 @@ Regular Expression Searches | |||
| 584 | * re-search-forward:: Very similar to @code{search-forward}. | 584 | * re-search-forward:: Very similar to @code{search-forward}. |
| 585 | * forward-sentence:: A straightforward example of regexp search. | 585 | * forward-sentence:: A straightforward example of regexp search. |
| 586 | * forward-paragraph:: A somewhat complex example. | 586 | * forward-paragraph:: A somewhat complex example. |
| 587 | * etags:: How to create your own @file{TAGS} table. | ||
| 588 | * Regexp Review:: | 587 | * Regexp Review:: |
| 589 | * re-search Exercises:: | 588 | * re-search Exercises:: |
| 590 | 589 | ||
| @@ -4583,54 +4582,21 @@ definition. | |||
| 4583 | @end ignore | 4582 | @end ignore |
| 4584 | 4583 | ||
| 4585 | More generally, if you want to see a function in its original source | 4584 | More generally, if you want to see a function in its original source |
| 4586 | file, you can use the @code{find-tag} function to jump to it. | 4585 | file, you can use the @code{xref-find-definitions} function to jump to |
| 4587 | @code{find-tag} works with a wide variety of languages, not just | 4586 | it. @code{xref-find-definitions} works with a wide variety of |
| 4588 | Lisp, and C, and it works with non-programming text as well. For | 4587 | languages, not just Lisp, and C, and it works with non-programming |
| 4589 | example, @code{find-tag} will jump to the various nodes in the | 4588 | text as well. For example, @code{xref-find-definitions} will jump to |
| 4590 | Texinfo source file of this document. | 4589 | the various nodes in the Texinfo source file of this document. |
| 4591 | The @code{find-tag} function depends on @dfn{tags tables} that record | 4590 | |
| 4592 | the locations of the functions, variables, and other items to which | 4591 | To use the @code{xref-find-definitions} command, type @kbd{M-.} |
| 4593 | @code{find-tag} jumps. | 4592 | (i.e., press the period key while holding down the @key{META} key, or |
| 4594 | 4593 | else type the @key{ESC} key and then type the period key), and then, | |
| 4595 | To use the @code{find-tag} command, type @kbd{M-.} (i.e., press the | 4594 | at the prompt, type in the name of the function whose source code you |
| 4596 | period key while holding down the @key{META} key, or else type the | 4595 | want to see, such as @code{mark-whole-buffer}, and then type |
| 4597 | @key{ESC} key and then type the period key), and then, at the prompt, | 4596 | @key{RET}. Emacs will switch buffers and display the source code for |
| 4598 | type in the name of the function whose source code you want to see, | 4597 | the function on your screen. To switch back to your current buffer, |
| 4599 | such as @code{mark-whole-buffer}, and then type @key{RET}. Emacs will | 4598 | type @kbd{C-x b @key{RET}}. (On some keyboards, the @key{META} key is |
| 4600 | switch buffers and display the source code for the function on your | 4599 | labeled @key{ALT}.) |
| 4601 | screen. To switch back to your current buffer, type @kbd{C-x b | ||
| 4602 | @key{RET}}. (On some keyboards, the @key{META} key is labeled | ||
| 4603 | @key{ALT}.) | ||
| 4604 | |||
| 4605 | @c !!! 22.1.1 tags table location in this paragraph | ||
| 4606 | @cindex TAGS table, specifying | ||
| 4607 | @findex find-tag | ||
| 4608 | Depending on how the initial default values of your copy of Emacs are | ||
| 4609 | set, you may also need to specify the location of your tags table, | ||
| 4610 | which is a file called @file{TAGS}. For example, if you are | ||
| 4611 | interested in Emacs sources, the tags table you will most likely want, | ||
| 4612 | if it has already been created for you, will be in a subdirectory of | ||
| 4613 | the @file{/usr/local/share/emacs/} directory; thus you would use the | ||
| 4614 | @code{M-x visit-tags-table} command and specify a pathname such as | ||
| 4615 | @file{/usr/local/share/emacs/22.1.1/lisp/TAGS}. If the tags table | ||
| 4616 | has not already been created, you will have to create it yourself. It | ||
| 4617 | will be in a file such as @file{/usr/local/src/emacs/src/TAGS}. | ||
| 4618 | |||
| 4619 | @need 1250 | ||
| 4620 | To create a @file{TAGS} file in a specific directory, switch to that | ||
| 4621 | directory in Emacs using @kbd{M-x cd} command, or list the directory | ||
| 4622 | with @kbd{C-x d} (@code{dired}). Then run the compile command, with | ||
| 4623 | @w{@code{etags *.el}} as the command to execute: | ||
| 4624 | |||
| 4625 | @smallexample | ||
| 4626 | M-x compile RET etags *.el RET | ||
| 4627 | @end smallexample | ||
| 4628 | |||
| 4629 | For more information, see @ref{etags, , Create Your Own @file{TAGS} File}. | ||
| 4630 | |||
| 4631 | After you become more familiar with Emacs Lisp, you will find that you will | ||
| 4632 | frequently use @code{find-tag} to navigate your way around source code; | ||
| 4633 | and you will create your own @file{TAGS} tables. | ||
| 4634 | 4600 | ||
| 4635 | @cindex Library, as term for ``file'' | 4601 | @cindex Library, as term for ``file'' |
| 4636 | Incidentally, the files that contain Lisp code are conventionally | 4602 | Incidentally, the files that contain Lisp code are conventionally |
| @@ -12142,7 +12108,6 @@ introduces several new features. | |||
| 12142 | * re-search-forward:: Very similar to @code{search-forward}. | 12108 | * re-search-forward:: Very similar to @code{search-forward}. |
| 12143 | * forward-sentence:: A straightforward example of regexp search. | 12109 | * forward-sentence:: A straightforward example of regexp search. |
| 12144 | * forward-paragraph:: A somewhat complex example. | 12110 | * forward-paragraph:: A somewhat complex example. |
| 12145 | * etags:: How to create your own @file{TAGS} table. | ||
| 12146 | * Regexp Review:: | 12111 | * Regexp Review:: |
| 12147 | * re-search Exercises:: | 12112 | * re-search Exercises:: |
| 12148 | @end menu | 12113 | @end menu |
| @@ -13294,130 +13259,6 @@ key; you will be taken directly to the source. (Be sure to install | |||
| 13294 | your sources! Without them, you are like a person who tries to drive | 13259 | your sources! Without them, you are like a person who tries to drive |
| 13295 | a car with his eyes shut!) | 13260 | a car with his eyes shut!) |
| 13296 | 13261 | ||
| 13297 | @node etags | ||
| 13298 | @section Create Your Own @file{TAGS} File | ||
| 13299 | @findex etags | ||
| 13300 | @cindex @file{TAGS} file, create own | ||
| 13301 | |||
| 13302 | Besides @kbd{C-h f} (@code{describe-function}), another way to see the | ||
| 13303 | source of a function is to type @kbd{M-.} (@code{find-tag}) and the | ||
| 13304 | name of the function when prompted for it. This is a good habit to | ||
| 13305 | get into. The @kbd{M-.} (@code{find-tag}) command takes you directly | ||
| 13306 | to the source for a function, variable, or node. The function depends | ||
| 13307 | on tags tables to tell it where to go. | ||
| 13308 | |||
| 13309 | If the @code{find-tag} function first asks you for the name of a | ||
| 13310 | @file{TAGS} table, give it the name of a @file{TAGS} file such as | ||
| 13311 | @file{/usr/local/src/emacs/src/TAGS}. (The exact path to your | ||
| 13312 | @file{TAGS} file depends on how your copy of Emacs was installed. I | ||
| 13313 | just told you the location that provides both my C and my Emacs Lisp | ||
| 13314 | sources.) | ||
| 13315 | |||
| 13316 | You can also create your own @file{TAGS} file for directories that | ||
| 13317 | lack one. | ||
| 13318 | |||
| 13319 | You often need to build and install tags tables yourself. They are | ||
| 13320 | not built automatically. A tags table is called a @file{TAGS} file; | ||
| 13321 | the name is in upper case letters. | ||
| 13322 | |||
| 13323 | You can create a @file{TAGS} file by calling the @code{etags} program | ||
| 13324 | that comes as a part of the Emacs distribution. Usually, @code{etags} | ||
| 13325 | is compiled and installed when Emacs is built. (@code{etags} is not | ||
| 13326 | an Emacs Lisp function or a part of Emacs; it is a C program.) | ||
| 13327 | |||
| 13328 | @need 1250 | ||
| 13329 | To create a @file{TAGS} file, first switch to the directory in which | ||
| 13330 | you want to create the file. In Emacs you can do this with the | ||
| 13331 | @kbd{M-x cd} command, or by visiting a file in the directory, or by | ||
| 13332 | listing the directory with @kbd{C-x d} (@code{dired}). Then run the | ||
| 13333 | compile command, with @w{@code{etags *.el}} as the command to execute | ||
| 13334 | |||
| 13335 | @smallexample | ||
| 13336 | M-x compile RET etags *.el RET | ||
| 13337 | @end smallexample | ||
| 13338 | |||
| 13339 | @noindent | ||
| 13340 | to create a @file{TAGS} file for Emacs Lisp. | ||
| 13341 | |||
| 13342 | For example, if you have a large number of files in your | ||
| 13343 | @file{~/emacs} directory, as I do---I have 137 @file{.el} files in it, | ||
| 13344 | of which I load 12---you can create a @file{TAGS} file for the Emacs | ||
| 13345 | Lisp files in that directory. | ||
| 13346 | |||
| 13347 | @need 1250 | ||
| 13348 | The @code{etags} program takes all the usual shell wildcards. For | ||
| 13349 | example, if you have two directories for which you want a single | ||
| 13350 | @file{TAGS} file, type @w{@code{etags *.el ../elisp/*.el}}, where | ||
| 13351 | @file{../elisp/} is the second directory: | ||
| 13352 | |||
| 13353 | @smallexample | ||
| 13354 | M-x compile RET etags *.el ../elisp/*.el RET | ||
| 13355 | @end smallexample | ||
| 13356 | |||
| 13357 | @need 1250 | ||
| 13358 | Type | ||
| 13359 | |||
| 13360 | @smallexample | ||
| 13361 | M-x compile RET etags --help RET | ||
| 13362 | @end smallexample | ||
| 13363 | |||
| 13364 | @noindent | ||
| 13365 | to see a list of the options accepted by @code{etags} as well as a | ||
| 13366 | list of supported languages. | ||
| 13367 | |||
| 13368 | The @code{etags} program handles more than 20 languages, including | ||
| 13369 | Emacs Lisp, Common Lisp, Scheme, C, C++, Ada, Fortran, HTML, Java, | ||
| 13370 | LaTeX, Pascal, Perl, PostScript, Python, TeX, Texinfo, makefiles, and | ||
| 13371 | most assemblers. The program has no switches for specifying the | ||
| 13372 | language; it recognizes the language in an input file according to its | ||
| 13373 | file name and contents. | ||
| 13374 | |||
| 13375 | @file{etags} is very helpful when you are writing code yourself and | ||
| 13376 | want to refer back to functions you have already written. Just run | ||
| 13377 | @code{etags} again at intervals as you write new functions, so they | ||
| 13378 | become part of the @file{TAGS} file. | ||
| 13379 | |||
| 13380 | If you think an appropriate @file{TAGS} file already exists for what | ||
| 13381 | you want, but do not know where it is, you can use the @code{locate} | ||
| 13382 | program to attempt to find it. | ||
| 13383 | |||
| 13384 | Type @w{@kbd{M-x locate @key{RET} TAGS @key{RET}}} and Emacs will list | ||
| 13385 | for you the full path names of all your @file{TAGS} files. On my | ||
| 13386 | system, this command lists 34 @file{TAGS} files. On the other hand, a | ||
| 13387 | plain vanilla system I recently installed did not contain any | ||
| 13388 | @file{TAGS} files. | ||
| 13389 | |||
| 13390 | If the tags table you want has been created, you can use the @code{M-x | ||
| 13391 | visit-tags-table} command to specify it. Otherwise, you will need to | ||
| 13392 | create the tag table yourself and then use @code{M-x | ||
| 13393 | visit-tags-table}. | ||
| 13394 | |||
| 13395 | @subsubheading Building Tags in the Emacs sources | ||
| 13396 | @cindex Building Tags in the Emacs sources | ||
| 13397 | @cindex Tags in the Emacs sources | ||
| 13398 | @findex make tags | ||
| 13399 | |||
| 13400 | The GNU Emacs sources come with a @file{Makefile} that contains a | ||
| 13401 | sophisticated @code{etags} command that creates, collects, and merges | ||
| 13402 | tags tables from all over the Emacs sources and puts the information | ||
| 13403 | into one @file{TAGS} file in the @file{src/} directory. (The | ||
| 13404 | @file{src/} directory is below the top level of your Emacs directory.) | ||
| 13405 | |||
| 13406 | @need 1250 | ||
| 13407 | To build this @file{TAGS} file, go to the top level of your Emacs | ||
| 13408 | source directory and run the compile command @code{make tags}: | ||
| 13409 | |||
| 13410 | @smallexample | ||
| 13411 | M-x compile RET make tags RET | ||
| 13412 | @end smallexample | ||
| 13413 | |||
| 13414 | @noindent | ||
| 13415 | (The @code{make tags} command works well with the GNU Emacs sources, | ||
| 13416 | as well as with some other source packages.) | ||
| 13417 | |||
| 13418 | For more information, see @ref{Tags, , Tag Tables, emacs, The GNU Emacs | ||
| 13419 | Manual}. | ||
| 13420 | |||
| 13421 | @node Regexp Review | 13262 | @node Regexp Review |
| 13422 | @section Review | 13263 | @section Review |
| 13423 | 13264 | ||
diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi index fd4fd4f3798..8eee9e1d869 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi | |||
| @@ -2290,7 +2290,7 @@ is actually typical for regexp syntax.) | |||
| 2290 | @cindex Recursive search/replace operations | 2290 | @cindex Recursive search/replace operations |
| 2291 | 2291 | ||
| 2292 | Dired mode (@kbd{M-x dired @key{RET}}, or @kbd{C-x d}) supports the | 2292 | Dired mode (@kbd{M-x dired @key{RET}}, or @kbd{C-x d}) supports the |
| 2293 | command @code{dired-do-query-replace-regexp} (@kbd{Q}), which allows | 2293 | command @code{dired-do-find-regexp-and-replace} (@kbd{Q}), which allows |
| 2294 | users to replace regular expressions in multiple files. | 2294 | users to replace regular expressions in multiple files. |
| 2295 | 2295 | ||
| 2296 | You can use this command to perform search/replace operations on | 2296 | You can use this command to perform search/replace operations on |
| @@ -2315,7 +2315,7 @@ To accept all replacements in each file, hit @kbd{!}. | |||
| 2315 | Another way to do the same thing is to use the ``tags'' feature of | 2315 | Another way to do the same thing is to use the ``tags'' feature of |
| 2316 | Emacs: it includes the command @code{tags-query-replace} which performs | 2316 | Emacs: it includes the command @code{tags-query-replace} which performs |
| 2317 | a query-replace across all the files mentioned in the @file{TAGS} file. | 2317 | a query-replace across all the files mentioned in the @file{TAGS} file. |
| 2318 | @xref{Tags Search,,, emacs, The GNU Emacs Manual}. | 2318 | @xref{Identifier Search,,, emacs, The GNU Emacs Manual}. |
| 2319 | 2319 | ||
| 2320 | @node Documentation for etags | 2320 | @node Documentation for etags |
| 2321 | @section Where is the documentation for @code{etags}? | 2321 | @section Where is the documentation for @code{etags}? |
diff --git a/doc/misc/sem-user.texi b/doc/misc/sem-user.texi index a8684a40b3a..fd88c88c7eb 100644 --- a/doc/misc/sem-user.texi +++ b/doc/misc/sem-user.texi | |||
| @@ -874,9 +874,9 @@ command, like this: | |||
| 874 | @end example | 874 | @end example |
| 875 | @end defun | 875 | @end defun |
| 876 | 876 | ||
| 877 | These commands are often more accurate than the @code{find-tag} | 877 | These commands are often more accurate than the @code{xref-find-definitions} |
| 878 | command (@pxref{Tags,,,emacs,Emacs manual}), because the Semantic | 878 | command (@pxref{Looking Up Identifiers,,,emacs,Emacs manual}), because |
| 879 | Analyzer is context-sensitive. | 879 | the Semantic Analyzer is context-sensitive. |
| 880 | 880 | ||
| 881 | You can also use @kbd{C-c , j} (@code{semantic-complete-jump-local}) | 881 | You can also use @kbd{C-c , j} (@code{semantic-complete-jump-local}) |
| 882 | and @kbd{C-c , J} (@code{semantic-complete-jump}) to navigate tags. | 882 | and @kbd{C-c , J} (@code{semantic-complete-jump}) to navigate tags. |
diff --git a/doc/misc/url.texi b/doc/misc/url.texi index a3c6b88ea05..91cb6b54a84 100644 --- a/doc/misc/url.texi +++ b/doc/misc/url.texi | |||
| @@ -820,12 +820,12 @@ The file transfer protocol. @xref{file/ftp}. | |||
| 820 | 820 | ||
| 821 | @item ssh | 821 | @item ssh |
| 822 | @cindex ssh | 822 | @cindex ssh |
| 823 | The secure shell protocol. @xref{Inline Methods,,, tramp, The Tramp | 823 | The secure shell protocol. @xref{Inline methods,,, tramp, The Tramp |
| 824 | Manual}. | 824 | Manual}. |
| 825 | 825 | ||
| 826 | @item scp | 826 | @item scp |
| 827 | @cindex scp | 827 | @cindex scp |
| 828 | The secure file copy protocol. @xref{External Methods,,, tramp, The | 828 | The secure file copy protocol. @xref{External methods,,, tramp, The |
| 829 | Tramp Manual}. | 829 | Tramp Manual}. |
| 830 | 830 | ||
| 831 | @item rsync | 831 | @item rsync |
diff --git a/doc/misc/viper.texi b/doc/misc/viper.texi index 6b169f3c8e6..6b82653c629 100644 --- a/doc/misc/viper.texi +++ b/doc/misc/viper.texi | |||
| @@ -2568,7 +2568,7 @@ above block should be commented out. | |||
| 2568 | 2568 | ||
| 2569 | Even though these commands are sometimes useful, they are no substitute for | 2569 | Even though these commands are sometimes useful, they are no substitute for |
| 2570 | the powerful @emph{tag table} facility of Emacs. Viper's @kbd{:tag} command | 2570 | the powerful @emph{tag table} facility of Emacs. Viper's @kbd{:tag} command |
| 2571 | in a primitive interface to Emacs tags. @xref{Tags,Tags,Tags,emacs, | 2571 | in a primitive interface to Emacs tags. @xref{Tags Tables,,,emacs, |
| 2572 | The GNU Emacs Manual}, for more information on tags. | 2572 | The GNU Emacs Manual}, for more information on tags. |
| 2573 | 2573 | ||
| 2574 | The following two commands are normally bound to a mouse click and are part | 2574 | The following two commands are normally bound to a mouse click and are part |