aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2002-07-07 23:42:46 +0000
committerRichard M. Stallman2002-07-07 23:42:46 +0000
commited1b7d5eda0334b9560013f313b90f483c561c39 (patch)
tree4e47206894339ed2762cd012e29ef7c48b5d7be2
parent44fa0ae8d4610e8acf4a91d80b2323ac5496c32b (diff)
downloademacs-ed1b7d5eda0334b9560013f313b90f483c561c39.tar.gz
emacs-ed1b7d5eda0334b9560013f313b90f483c561c39.zip
Describe add-log-always-start-new-record.
Substantial rewrite of etags regexp option text.
-rw-r--r--man/maintaining.texi148
1 files changed, 54 insertions, 94 deletions
diff --git a/man/maintaining.texi b/man/maintaining.texi
index a9d126816e3..16d63a463d2 100644
--- a/man/maintaining.texi
+++ b/man/maintaining.texi
@@ -103,6 +103,11 @@ change log entry. It finds the version number by searching the first
103ten percent of the file, using regular expressions from the variable 103ten percent of the file, using regular expressions from the variable
104@code{change-log-version-number-regexp-list}. 104@code{change-log-version-number-regexp-list}.
105 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
109was made by you and on the same date.
110
106@cindex Change Log mode 111@cindex Change Log mode
107@findex change-log-mode 112@findex change-log-mode
108 The change log file is visited in Change Log mode. In this major 113 The change log file is visited in Change Log mode. In this major
@@ -474,95 +479,51 @@ explanation.
474 479
475 The @samp{--regex} option provides a general way of recognizing tags 480 The @samp{--regex} option provides a general way of recognizing tags
476based on regexp matching. You can freely intermix it with file names. 481based on regexp matching. You can freely intermix it with file names.
477Each @samp{--regex} option adds to the preceding ones, and applies only 482If you specify multiple @samp{--regex} options, all of them are used
478to the following files. The syntax is: 483in parallel, but each one applies only to the source files that follow
484it. The syntax is:
479 485
480@smallexample 486@smallexample
481--regex=[@var{@{language@}}]/@var{tagregexp}/[@var{nameregexp}/]@var{modifiers} 487--regex=[@var{@{language@}}]/@var{tagregexp}/[@var{nameregexp}/]@var{modifiers}
482@end smallexample 488@end smallexample
483 489
484@noindent 490 The essential part of the option value is @var{tagregexp}, the
485or else: 491regexp for matching tags. It is always used anchored, that is, it
486 492only matches at the beginning of a line. If you want to allow
487@smallexample 493indented tags, use a regexp that matches initial whitespace; start it
488--regex=@@@var{regexfile} 494with @samp{[ \t]*}.
489@end smallexample 495
490 496 In these regular expressions, @samp{\} quotes the next character, and
491@noindent 497all the GCC character escape sequences are supported (@samp{\a} for
492where @var{tagregexp} is a regular expression used to find the tags. 498bell, @samp{\b} for back space, @samp{\d} for delete, @samp{\e} for
493It is always 499escape, @samp{\f} for formfeed, @samp{\n} for newline, @samp{\r} for
494anchored, that is, it behaves as if preceded by @samp{^}. If you want 500carriage return, @samp{\t} for tab, and @samp{\v} for vertical tab).
495to account for indentation, just match any initial number of blanks by 501
496beginning your regular expression with @samp{[ \t]*}. In the regular 502 Ideally, @var{tagregexp} should not match more characters than are
497expressions, @samp{\} quotes the next character, and all the 503needed to recognize what you want to tag. If the syntax requires you
498@code{gcc} character escape sequences are supported. Here is the list 504to write @var{tagregexp} so it matches more characters beyond the tag
499of the character escape sequences: 505itself, you should add a @var{nameregexp}, to pick out just the tag.
500 506This will enable Emacs to find tags more accurately and to do
501@table @samp 507completion on tag names more reliably. You can find some examples
502@item \a 508below.
503BEL (bell). 509
504@item \b 510 The @var{modifiers} are a sequence of zero or more characters that
505BS (back space). 511modify the way @code{etags} does the matching. A regexp with no
506@item \d 512modifiers is applied sequentially to each line of the input file, in a
507DEL (delete). 513case-sensitive way. The modifiers and their meanings are:
508@item \e
509ESC (delete).
510@item \f
511FF (form feed).
512@item \n
513NL (new line).
514@item \r
515CR (carriage return).
516@item \t
517TAB (horizontal tab).
518@item \v
519VT (vertical tab).
520@end table
521
522@noindent
523The syntax of regular expressions in @code{etags} is the same as in
524Emacs.
525
526 You should not match more characters with @var{tagregexp} than that
527needed to recognize what you want to tag. If the match is such that
528more characters than needed are unavoidably matched by @var{tagregexp}
529(as will sometimes be the case), you should add a @var{nameregexp}, to
530pick out just the tag. This will enable Emacs to find tags more
531accurately and to do completion on tag names more reliably. You can
532find some examples below.
533
534 The suggested separator character used to delimit @var{tagregexp}
535and @var{nameregex} is @samp{/}, as in the example above. However,
536you can use any other character as a separator, as long as it is
537different from space, tab, braces or the @samp{@@} character. If you
538need to use the separator as part of the regular expression, you must
539precede it by the @samp{\} character.
540
541 The @var{modifiers} are a sequence of 0 or more characters that
542modify the way @code{etags} does the matching for that particular
543@samp{--regex} option. Without modifiers, the regular expression
544is applied sequentially to each line of the input file, in
545a case-sensitive way. The modifiers and their meanings are:
546 514
547@table @samp 515@table @samp
548@item i 516@item i
549ignore case when matching. 517Ignore case when matching this regexp.
550@item m 518@item m
551do not match line by line; rather, match this regular expression 519Match this regular expression against the whole file, so that
552against the whole file, so that multi-line matches are possible. 520multi-line matches are possible.
553@item s 521@item s
554implies @samp{m}, and causes dots in @var{tagregexp} to match newlines 522Match this regular expression against the whole file, and allow
555as well. 523@samp{.} in @var{tagregexp} to match newlines.
556@end table 524@end table
557 525
558 A @var{regexfile} is the name of a file where you can store the 526 The @samp{-R} option cancels all the regexps defined by preceding
559arguments of @samp{--regex} options, one per line. The syntax is the
560same as the one used for the @samp{--regex} option, without the
561initial @samp{--regex=} part. @code{etags} ignores the lines that
562begin with space or tab: you can use them to include comments in the
563@var{regexfile}.
564
565 The @samp{-R} option deletes all the regexps defined with
566@samp{--regex} options. It applies to the file names following it, as 527@samp{--regex} options. It applies to the file names following it, as
567you can see from the following example: 528you can see from the following example:
568 529
@@ -580,8 +541,8 @@ Here @code{etags} chooses the parsing language for @file{voo.doo} and
580@file{voo.doo} and @file{bar.ber}, in a case-insensitive way, while 541@file{voo.doo} and @file{bar.ber}, in a case-insensitive way, while
581@var{reg2} is checked against the whole @file{bar.ber} file, 542@var{reg2} is checked against the whole @file{bar.ber} file,
582permitting multi-line matches, in a case-sensitive way. @code{etags} 543permitting multi-line matches, in a case-sensitive way. @code{etags}
583uses the Lisp tags rules, and no regexp matching, to recognize tags in 544uses only the Lisp tags rules, with no user-specified regexp matching,
584@file{los.er}. 545to recognize tags in @file{los.er}.
585 546
586 You can restrict a @samp{--regex} option to match only files of a 547 You can restrict a @samp{--regex} option to match only files of a
587given language by using the optional prefix @var{@{language@}}. 548given language by using the optional prefix @var{@{language@}}.
@@ -596,26 +557,25 @@ files, for the C language only:
596@end smallexample 557@end smallexample
597 558
598@noindent 559@noindent
599This feature is particularly useful when you store a list of regular 560When you have complex regular expressions, you can store the list of
600expressions in a file. The following option syntax instructs 561them in a file. The following option syntax instructs @code{etags} to
601@code{etags} to read two files of regular expressions. The regular 562read two files of regular expressions. The regular expressions
602expressions contained in the second file are matched without regard to 563contained in the second file are matched without regard to case.
603case.
604 564
605@smallexample 565@smallexample
606--regex=@@first-file --ignore-case-regex=@@second-file 566--regex=@@@var{case-sensitive-file} --ignore-case-regex=@@@var{ignore-case-file}
607@end smallexample 567@end smallexample
608 568
609@noindent 569@noindent
610A regex file contains one regular expressions per line. Empty lines, 570A regex file for @code{etags} contains one regular expression per
611and lines beginning with space or tab are ignored. When the first 571line. Empty lines, and lines beginning with space or tab are ignored.
612character in a line is @samp{@@}, @code{etags} assumes that the rest 572When the first character in a line is @samp{@@}, @code{etags} assumes
613of the line is the name of a file of regular expressions; thus, one 573that the rest of the line is the name of another file of regular
614such file can include another file. All the other lines are taken to 574expressions; thus, one such file can include another file. All the
615be regular expressions. If the first non-whitespace text on the line 575other lines are taken to be regular expressions. If the first
616is @samp{--}, that line is a comment. 576non-whitespace text on the line is @samp{--}, that line is a comment.
617 577
618 For example, one can create a file called @samp{emacs.tags} with the 578 For example, we can create a file called @samp{emacs.tags} with the
619following contents: 579following contents:
620 580
621@smallexample 581@smallexample