/[emacs]/emacs/man/maintaining.texi
ViewVC logotype

Diff of /emacs/man/maintaining.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.19 by pot, Fri Jun 7 12:58:40 2002 UTC revision 1.19.2.1 by miles, Fri Apr 4 06:20:48 2003 UTC
# Line 103  change log entry.  It finds the version Line 103  change log entry.  It finds the version
103  ten percent of the file, using regular expressions from the variable  ten percent of the file, using regular expressions from the variable
104  @code{change-log-version-number-regexp-list}.  @code{change-log-version-number-regexp-list}.
105    
106    @vindex add-log-always-start-new-record
107      If @code{add-log-always-start-new-record} is non-@code{nil},
108    @kbd{C-x 4 a} always makes a new entry, even if the last entry
109    was made by you and on the same date.
110    
111  @cindex Change Log mode  @cindex Change Log mode
112  @findex change-log-mode  @findex change-log-mode
113    The change log file is visited in Change Log mode.  In this major    The change log file is visited in Change Log mode.  In this major
# Line 225  can make the tags table file much smalle Line 230  can make the tags table file much smalle
230    
231  You can tag function declarations and external variables in addition  You can tag function declarations and external variables in addition
232  to function definitions by giving the @samp{--declarations} option to  to function definitions by giving the @samp{--declarations} option to
233  @code{etags}.  @code{etags}.  You can tag struct members with the @samp{--members}
234    option.
235    
236  @item  @item
237  In C++ code, in addition to all the tag constructs of C code, member  In C++ code, in addition to all the tag constructs of C code, member
# Line 246  In La@TeX{} text, the argument of any of Line 252  In La@TeX{} text, the argument of any of
252  @code{\section}, @code{\subsection}, @code{\subsubsection},  @code{\section}, @code{\subsection}, @code{\subsubsection},
253  @code{\eqno}, @code{\label}, @code{\ref}, @code{\cite},  @code{\eqno}, @code{\label}, @code{\ref}, @code{\cite},
254  @code{\bibitem}, @code{\part}, @code{\appendix}, @code{\entry},  @code{\bibitem}, @code{\part}, @code{\appendix}, @code{\entry},
255  @code{\index}, @code{\def}, @code{\newcomand}, @code{\renewcommand},  @code{\index}, @code{\def}, @code{\newcommand}, @code{\renewcommand},
256  @code{\newenvironment} or @code{\renewenvironment} is a tag.@refill  @code{\newenvironment} or @code{\renewenvironment} is a tag.@refill
257    
258  Other commands can make tags as well, if you specify them in the  Other commands can make tags as well, if you specify them in the
# Line 266  specifies (using Bourne shell syntax) th Line 272  specifies (using Bourne shell syntax) th
272  @item  @item
273  In Lisp code, any function defined with @code{defun}, any variable  In Lisp code, any function defined with @code{defun}, any variable
274  defined with @code{defvar} or @code{defconst}, and in general the first  defined with @code{defvar} or @code{defconst}, and in general the first
275  argument of any expression that starts with @samp{(def} in column zero, is  argument of any expression that starts with @samp{(def} in column zero is
276  a tag.  a tag.
277    
278  @item  @item
# Line 280  set with @code{set!} at top level in the Line 286  set with @code{set!} at top level in the
286  @itemize @bullet  @itemize @bullet
287    
288  @item  @item
289  In Ada code, functions, procedures, packages, tasks, and types are  In Ada code, functions, procedures, packages, tasks and types are
290  tags.  Use the @samp{--packages-only} option to create tags for  tags.  Use the @samp{--packages-only} option to create tags for
291  packages only.  packages only.
292    
# Line 325  In Cobol code, tags are paragraph names; Line 331  In Cobol code, tags are paragraph names;
331  column 8 and followed by a period.  column 8 and followed by a period.
332    
333  @item  @item
334  In Erlang code, the tags are the functions, records, and macros defined  In Erlang code, the tags are the functions, records and macros defined
335  in the file.  in the file.
336    
337  @item  @item
338  In Fortran code, functions, subroutines and block data are tags.  In Fortran code, functions, subroutines and block data are tags.
339    
340  @item  @item
341  In makefiles, targets are tags.  In HTML input files, the tags are the @code{title} and the @code{h1},
342    @code{h2}, @code{h3} headers.  Also, tags are @code{name=} in anchors
343    and all occurrences of @code{id=}.
344    
345    @item
346    In makefiles, targets are tags; additionally, variables are tags
347    unless you specify @samp{--no-globals}.
348    
349  @item  @item
350  In Objective C code, tags include Objective C definitions for classes,  In Objective C code, tags include Objective C definitions for classes,
351  class categories, methods, and protocols.  Tags for variables and  class categories, methods and protocols.  Tags for variables and
352  functions in classes are named @samp{@var{class}::@var{variable}} and  functions in classes are named @samp{@var{class}::@var{variable}} and
353  @samp{@var{class}::@var{function}}.  @samp{@var{class}::@var{function}}.
354    
# Line 466  standard input and mark the produced tag Line 478  standard input and mark the produced tag
478    @samp{etags --help} prints the list of the languages @code{etags}    @samp{etags --help} prints the list of the languages @code{etags}
479  knows, and the file name rules for guessing the language.  It also prints  knows, and the file name rules for guessing the language.  It also prints
480  a list of all the available @code{etags} options, together with a short  a list of all the available @code{etags} options, together with a short
481  explanation.  explanation.  If followed by one or more @samp{--language=@var{lang}}
482    options, prints detailed information about how tags are generated for
483    @var{lang}.
484    
485  @node Etags Regexps  @node Etags Regexps
486  @subsection Etags Regexps  @subsection Etags Regexps
487    
488    The @samp{--regex} option provides a general way of recognizing tags    The @samp{--regex} option provides a general way of recognizing tags
489  based on regexp matching.  You can freely intermix it with file names.  based on regexp matching.  You can freely intermix it with file names.
490  Each @samp{--regex} option adds to the preceding ones, and applies only  If you specify multiple @samp{--regex} options, all of them are used
491  to the following files.  The syntax is:  in parallel, but each one applies only to the source files that follow
492    it.  The syntax is:
493    
494  @smallexample  @smallexample
495  --regex=/@var{tagregexp}[/@var{nameregexp}]/  --regex=[@var{@{language@}}]/@var{tagregexp}/[@var{nameregexp}/]@var{modifiers}
496  @end smallexample  @end smallexample
497    
498  @noindent    The essential part of the option value is @var{tagregexp}, the
499  where @var{tagregexp} is used to match the lines to tag.  It is always  regexp for matching tags.  It is always used anchored, that is, it
500  anchored, that is, it behaves as if preceded by @samp{^}.  If you want  only matches at the beginning of a line.  If you want to allow
501  to account for indentation, just match any initial number of blanks by  indented tags, use a regexp that matches initial whitespace; start it
502  beginning your regular expression with @samp{[ \t]*}.  In the regular  with @samp{[ \t]*}.
503  expressions, @samp{\} quotes the next character, and all the  
504  @code{gcc} character escape sequences are supported.  Here is the list    In these regular expressions, @samp{\} quotes the next character, and
505  of the character escape sequences:  all the GCC character escape sequences are supported (@samp{\a} for
506    bell, @samp{\b} for back space, @samp{\d} for delete, @samp{\e} for
507    escape, @samp{\f} for formfeed, @samp{\n} for newline, @samp{\r} for
508    carriage return, @samp{\t} for tab, and @samp{\v} for vertical tab).
509    
510      Ideally, @var{tagregexp} should not match more characters than are
511    needed to recognize what you want to tag.  If the syntax requires you
512    to write @var{tagregexp} so it matches more characters beyond the tag
513    itself, you should add a @var{nameregexp}, to pick out just the tag.
514    This will enable Emacs to find tags more accurately and to do
515    completion on tag names more reliably.  You can find some examples
516    below.
517    
518      The @var{modifiers} are a sequence of zero or more characters that
519    modify the way @code{etags} does the matching.  A regexp with no
520    modifiers is applied sequentially to each line of the input file, in a
521    case-sensitive way.  The modifiers and their meanings are:
522    
523  @table @samp  @table @samp
524  @item \a  @item i
525  BEL (bell).  Ignore case when matching this regexp.
526  @item \b  @item m
527  BS (back space).  Match this regular expression against the whole file, so that
528  @item \d  multi-line matches are possible.
529  DEL (delete).  @item s
530  @item \e  Match this regular expression against the whole file, and allow
531  ESC (delete).  @samp{.} in @var{tagregexp} to match newlines.
 @item \f  
 FF (form feed).  
 @item \n  
 NL (new line).  
 @item \r  
 CR (carriage return).  
 @item \t  
 TAB (horizontal tab).  
 @item \v  
 VT (vertical tab).  
532  @end table  @end table
533    
534    The syntax of regular expressions in @code{etags} is the same as in    The @samp{-R} option cancels all the regexps defined by preceding
 Emacs.  
   
   You should not match more characters with @var{tagregexp} than that  
 needed to recognize what you want to tag.  If the match is such that  
 more characters than needed are unavoidably matched by @var{tagregexp}  
 (as will usually be the case), you should add a @var{nameregexp}, to  
 pick out just the tag.  This will enable Emacs to find tags more  
 accurately and to do completion on tag names more reliably.  You can  
 find some examples below.  
   
   The option @samp{--ignore-case-regex} (or @samp{-c}) works like  
 @samp{--regex}, except that matching ignores case.  This is  
 appropriate for certain programming languages.  
   
   The @samp{-R} option deletes all the regexps defined with  
535  @samp{--regex} options.  It applies to the file names following it, as  @samp{--regex} options.  It applies to the file names following it, as
536  you can see from the following example:  you can see from the following example:
537    
538  @smallexample  @smallexample
539  etags --regex=/@var{reg1}/ voo.doo --regex=/@var{reg2}/ \  etags --regex=/@var{reg1}/i voo.doo --regex=/@var{reg2}/m \
540      bar.ber -R --lang=lisp los.er      bar.ber -R --lang=lisp los.er
541  @end smallexample  @end smallexample
542    
# Line 539  Here @code{etags} chooses the parsing la Line 545  Here @code{etags} chooses the parsing la
545  @file{bar.ber} according to their contents.  @code{etags} also uses  @file{bar.ber} according to their contents.  @code{etags} also uses
546  @var{reg1} to recognize additional tags in @file{voo.doo}, and both  @var{reg1} to recognize additional tags in @file{voo.doo}, and both
547  @var{reg1} and @var{reg2} to recognize additional tags in  @var{reg1} and @var{reg2} to recognize additional tags in
548  @file{bar.ber}.  @code{etags} uses the Lisp tags rules, and no regexp  @file{bar.ber}.  @var{reg1} is checked against each line of
549  matching, to recognize tags in @file{los.er}.  @file{voo.doo} and @file{bar.ber}, in a case-insensitive way, while
550    @var{reg2} is checked against the whole @file{bar.ber} file,
551    You can specify a regular expression for a particular language, by  permitting multi-line matches, in a case-sensitive way.  @code{etags}
552  writing @samp{@{lang@}} in front of it.  Then @code{etags} will use  uses only the Lisp tags rules, with no user-specified regexp matching,
553  the regular expression only for files of that language.  (@samp{etags  to recognize tags in @file{los.er}.
554  --help} prints the list of languages recognized by @code{etags}.)  The  
555      You can restrict a @samp{--regex} option to match only files of a
556    given language by using the optional prefix @var{@{language@}}.
557    (@samp{etags --help} prints the list of languages recognized by
558    @code{etags}.)  This is particularly useful when storing many
559    predefined regular expressions for @code{etags} in a file.  The
560  following example tags the @code{DEFVAR} macros in the Emacs source  following example tags the @code{DEFVAR} macros in the Emacs source
561  files, for the C language only:  files, for the C language only:
562    
# Line 554  files, for the C language only: Line 565  files, for the C language only:
565  @end smallexample  @end smallexample
566    
567  @noindent  @noindent
568  This feature is particularly useful when you store a list of regular  When you have complex regular expressions, you can store the list of
569  expressions in a file.  The following option syntax instructs  them in a file.  The following option syntax instructs @code{etags} to
570  @code{etags} to read two files of regular expressions.  The regular  read two files of regular expressions.  The regular expressions
571  expressions contained in the second file are matched without regard to  contained in the second file are matched without regard to case.
 case.  
572    
573  @smallexample  @smallexample
574  --regex=@@first-file --ignore-case-regex=@@second-file  --regex=@@@var{case-sensitive-file} --ignore-case-regex=@@@var{ignore-case-file}
575  @end smallexample  @end smallexample
576    
577  @noindent  @noindent
578  A regex file contains one regular expressions per line.  Empty lines,  A regex file for @code{etags} contains one regular expression per
579  and lines beginning with space or tab are ignored.  When the first  line.  Empty lines, and lines beginning with space or tab are ignored.
580  character in a line is @samp{@@}, @code{etags} assumes that the rest  When the first character in a line is @samp{@@}, @code{etags} assumes
581  of the line is the name of a file of regular expressions; thus, one  that the rest of the line is the name of another file of regular
582  such file can include another file.  All the other lines are taken to  expressions; thus, one such file can include another file.  All the
583  be regular expressions.  If the first non-whitespace text on the line  other lines are taken to be regular expressions.  If the first
584  is @samp{--}, that line is a comment.  non-whitespace text on the line is @samp{--}, that line is a comment.
585    
586    For example, one can create a file called @samp{emacs.tags} with the    For example, we can create a file called @samp{emacs.tags} with the
587  following contents:  following contents:
588    
589  @smallexample  @smallexample

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.19.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26