aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2016-05-24 21:24:45 +0300
committerEli Zaretskii2016-05-24 21:24:45 +0300
commit2e589c00422e68624024c8a77799d54964e7b3a2 (patch)
treefb62c22debba448b181a109ad4f11ebd93b0feb4
parentf3d2dedeba37d899be72a37339d0370aa3ae4c70 (diff)
downloademacs-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.texi189
-rw-r--r--doc/misc/efaq.texi4
-rw-r--r--doc/misc/sem-user.texi6
-rw-r--r--doc/misc/url.texi4
-rw-r--r--doc/misc/viper.texi2
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
4585More generally, if you want to see a function in its original source 4584More generally, if you want to see a function in its original source
4586file, you can use the @code{find-tag} function to jump to it. 4585file, 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 4586it. @code{xref-find-definitions} works with a wide variety of
4588Lisp, and C, and it works with non-programming text as well. For 4587languages, not just Lisp, and C, and it works with non-programming
4589example, @code{find-tag} will jump to the various nodes in the 4588text as well. For example, @code{xref-find-definitions} will jump to
4590Texinfo source file of this document. 4589the various nodes in the Texinfo source file of this document.
4591The @code{find-tag} function depends on @dfn{tags tables} that record 4590
4592the locations of the functions, variables, and other items to which 4591To 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 4593else type the @key{ESC} key and then type the period key), and then,
4595To use the @code{find-tag} command, type @kbd{M-.} (i.e., press the 4594at the prompt, type in the name of the function whose source code you
4596period key while holding down the @key{META} key, or else type the 4595want 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
4598type in the name of the function whose source code you want to see, 4597the function on your screen. To switch back to your current buffer,
4599such as @code{mark-whole-buffer}, and then type @key{RET}. Emacs will 4598type @kbd{C-x b @key{RET}}. (On some keyboards, the @key{META} key is
4600switch buffers and display the source code for the function on your 4599labeled @key{ALT}.)
4601screen. 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
4608Depending on how the initial default values of your copy of Emacs are
4609set, you may also need to specify the location of your tags table,
4610which is a file called @file{TAGS}. For example, if you are
4611interested in Emacs sources, the tags table you will most likely want,
4612if it has already been created for you, will be in a subdirectory of
4613the @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
4616has not already been created, you will have to create it yourself. It
4617will be in a file such as @file{/usr/local/src/emacs/src/TAGS}.
4618
4619@need 1250
4620To create a @file{TAGS} file in a specific directory, switch to that
4621directory in Emacs using @kbd{M-x cd} command, or list the directory
4622with @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
4626M-x compile RET etags *.el RET
4627@end smallexample
4628
4629For more information, see @ref{etags, , Create Your Own @file{TAGS} File}.
4630
4631After you become more familiar with Emacs Lisp, you will find that you will
4632frequently use @code{find-tag} to navigate your way around source code;
4633and you will create your own @file{TAGS} tables.
4634 4600
4635@cindex Library, as term for ``file'' 4601@cindex Library, as term for ``file''
4636Incidentally, the files that contain Lisp code are conventionally 4602Incidentally, 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
13294your sources! Without them, you are like a person who tries to drive 13259your sources! Without them, you are like a person who tries to drive
13295a car with his eyes shut!) 13260a 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
13302Besides @kbd{C-h f} (@code{describe-function}), another way to see the
13303source of a function is to type @kbd{M-.} (@code{find-tag}) and the
13304name of the function when prompted for it. This is a good habit to
13305get into. The @kbd{M-.} (@code{find-tag}) command takes you directly
13306to the source for a function, variable, or node. The function depends
13307on tags tables to tell it where to go.
13308
13309If 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
13313just told you the location that provides both my C and my Emacs Lisp
13314sources.)
13315
13316You can also create your own @file{TAGS} file for directories that
13317lack one.
13318
13319You often need to build and install tags tables yourself. They are
13320not built automatically. A tags table is called a @file{TAGS} file;
13321the name is in upper case letters.
13322
13323You can create a @file{TAGS} file by calling the @code{etags} program
13324that comes as a part of the Emacs distribution. Usually, @code{etags}
13325is compiled and installed when Emacs is built. (@code{etags} is not
13326an Emacs Lisp function or a part of Emacs; it is a C program.)
13327
13328@need 1250
13329To create a @file{TAGS} file, first switch to the directory in which
13330you 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
13332listing the directory with @kbd{C-x d} (@code{dired}). Then run the
13333compile command, with @w{@code{etags *.el}} as the command to execute
13334
13335@smallexample
13336M-x compile RET etags *.el RET
13337@end smallexample
13338
13339@noindent
13340to create a @file{TAGS} file for Emacs Lisp.
13341
13342For 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,
13344of which I load 12---you can create a @file{TAGS} file for the Emacs
13345Lisp files in that directory.
13346
13347@need 1250
13348The @code{etags} program takes all the usual shell wildcards. For
13349example, 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
13354M-x compile RET etags *.el ../elisp/*.el RET
13355@end smallexample
13356
13357@need 1250
13358Type
13359
13360@smallexample
13361M-x compile RET etags --help RET
13362@end smallexample
13363
13364@noindent
13365to see a list of the options accepted by @code{etags} as well as a
13366list of supported languages.
13367
13368The @code{etags} program handles more than 20 languages, including
13369Emacs Lisp, Common Lisp, Scheme, C, C++, Ada, Fortran, HTML, Java,
13370LaTeX, Pascal, Perl, PostScript, Python, TeX, Texinfo, makefiles, and
13371most assemblers. The program has no switches for specifying the
13372language; it recognizes the language in an input file according to its
13373file name and contents.
13374
13375@file{etags} is very helpful when you are writing code yourself and
13376want to refer back to functions you have already written. Just run
13377@code{etags} again at intervals as you write new functions, so they
13378become part of the @file{TAGS} file.
13379
13380If you think an appropriate @file{TAGS} file already exists for what
13381you want, but do not know where it is, you can use the @code{locate}
13382program to attempt to find it.
13383
13384Type @w{@kbd{M-x locate @key{RET} TAGS @key{RET}}} and Emacs will list
13385for you the full path names of all your @file{TAGS} files. On my
13386system, this command lists 34 @file{TAGS} files. On the other hand, a
13387plain vanilla system I recently installed did not contain any
13388@file{TAGS} files.
13389
13390If the tags table you want has been created, you can use the @code{M-x
13391visit-tags-table} command to specify it. Otherwise, you will need to
13392create the tag table yourself and then use @code{M-x
13393visit-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
13400The GNU Emacs sources come with a @file{Makefile} that contains a
13401sophisticated @code{etags} command that creates, collects, and merges
13402tags tables from all over the Emacs sources and puts the information
13403into 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
13407To build this @file{TAGS} file, go to the top level of your Emacs
13408source directory and run the compile command @code{make tags}:
13409
13410@smallexample
13411M-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,
13416as well as with some other source packages.)
13417
13418For more information, see @ref{Tags, , Tag Tables, emacs, The GNU Emacs
13419Manual}.
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
2292Dired mode (@kbd{M-x dired @key{RET}}, or @kbd{C-x d}) supports the 2292Dired mode (@kbd{M-x dired @key{RET}}, or @kbd{C-x d}) supports the
2293command @code{dired-do-query-replace-regexp} (@kbd{Q}), which allows 2293command @code{dired-do-find-regexp-and-replace} (@kbd{Q}), which allows
2294users to replace regular expressions in multiple files. 2294users to replace regular expressions in multiple files.
2295 2295
2296You can use this command to perform search/replace operations on 2296You can use this command to perform search/replace operations on
@@ -2315,7 +2315,7 @@ To accept all replacements in each file, hit @kbd{!}.
2315Another way to do the same thing is to use the ``tags'' feature of 2315Another way to do the same thing is to use the ``tags'' feature of
2316Emacs: it includes the command @code{tags-query-replace} which performs 2316Emacs: it includes the command @code{tags-query-replace} which performs
2317a query-replace across all the files mentioned in the @file{TAGS} file. 2317a 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
877These commands are often more accurate than the @code{find-tag} 877These commands are often more accurate than the @code{xref-find-definitions}
878command (@pxref{Tags,,,emacs,Emacs manual}), because the Semantic 878command (@pxref{Looking Up Identifiers,,,emacs,Emacs manual}), because
879Analyzer is context-sensitive. 879the Semantic Analyzer is context-sensitive.
880 880
881You can also use @kbd{C-c , j} (@code{semantic-complete-jump-local}) 881You can also use @kbd{C-c , j} (@code{semantic-complete-jump-local})
882and @kbd{C-c , J} (@code{semantic-complete-jump}) to navigate tags. 882and @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
823The secure shell protocol. @xref{Inline Methods,,, tramp, The Tramp 823The secure shell protocol. @xref{Inline methods,,, tramp, The Tramp
824Manual}. 824Manual}.
825 825
826@item scp 826@item scp
827@cindex scp 827@cindex scp
828The secure file copy protocol. @xref{External Methods,,, tramp, The 828The secure file copy protocol. @xref{External methods,,, tramp, The
829Tramp Manual}. 829Tramp 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
2569Even though these commands are sometimes useful, they are no substitute for 2569Even though these commands are sometimes useful, they are no substitute for
2570the powerful @emph{tag table} facility of Emacs. Viper's @kbd{:tag} command 2570the powerful @emph{tag table} facility of Emacs. Viper's @kbd{:tag} command
2571in a primitive interface to Emacs tags. @xref{Tags,Tags,Tags,emacs, 2571in a primitive interface to Emacs tags. @xref{Tags Tables,,,emacs,
2572The GNU Emacs Manual}, for more information on tags. 2572The GNU Emacs Manual}, for more information on tags.
2573 2573
2574The following two commands are normally bound to a mouse click and are part 2574The following two commands are normally bound to a mouse click and are part