diff options
| author | Francesco Potortì | 2002-06-13 12:10:00 +0000 |
|---|---|---|
| committer | Francesco Potortì | 2002-06-13 12:10:00 +0000 |
| commit | cc76b31124d08a3aa6de24a0dfd73398ecb10a19 (patch) | |
| tree | 822e5a901031870d6b3612f74c8468ac61ad5051 | |
| parent | 6861f0e32703a5651644c623db324ddb086308a7 (diff) | |
| download | emacs-cc76b31124d08a3aa6de24a0dfd73398ecb10a19.tar.gz emacs-cc76b31124d08a3aa6de24a0dfd73398ecb10a19.zip | |
New multi-line regexp and new regexp syntax.
New {language} and @regexp features.
| -rw-r--r-- | man/maintaining.texi | 39 |
1 files changed, 33 insertions, 6 deletions
diff --git a/man/maintaining.texi b/man/maintaining.texi index c324f843a81..fc8feaa95b2 100644 --- a/man/maintaining.texi +++ b/man/maintaining.texi | |||
| @@ -477,11 +477,17 @@ Each @samp{--regex} option adds to the preceding ones, and applies only | |||
| 477 | to the following files. The syntax is: | 477 | to the following files. The syntax is: |
| 478 | 478 | ||
| 479 | @smallexample | 479 | @smallexample |
| 480 | --regex=/@var{tagregexp}[/@var{nameregexp}]/ | 480 | --regex=[@var{@{language@}}]/@var{tagregexp}/[@var{nameregexp}/]@var{modifiers} |
| 481 | @end smallexample | ||
| 482 | |||
| 483 | or else: | ||
| 484 | |||
| 485 | @smallexample | ||
| 486 | --regex=@@@var{regexfile} | ||
| 481 | @end smallexample | 487 | @end smallexample |
| 482 | 488 | ||
| 483 | @noindent | 489 | @noindent |
| 484 | where @var{tagregexp} is used to match the lines to tag. It is always | 490 | where @var{tagregexp} is used to find the tags. It is always |
| 485 | anchored, that is, it behaves as if preceded by @samp{^}. If you want | 491 | anchored, that is, it behaves as if preceded by @samp{^}. If you want |
| 486 | to account for indentation, just match any initial number of blanks by | 492 | to account for indentation, just match any initial number of blanks by |
| 487 | beginning your regular expression with @samp{[ \t]*}. In the regular | 493 | beginning your regular expression with @samp{[ \t]*}. In the regular |
| @@ -516,14 +522,35 @@ Emacs. | |||
| 516 | You should not match more characters with @var{tagregexp} than that | 522 | You should not match more characters with @var{tagregexp} than that |
| 517 | needed to recognize what you want to tag. If the match is such that | 523 | needed to recognize what you want to tag. If the match is such that |
| 518 | more characters than needed are unavoidably matched by @var{tagregexp} | 524 | more characters than needed are unavoidably matched by @var{tagregexp} |
| 519 | (as will usually be the case), you should add a @var{nameregexp}, to | 525 | (as will sometimes be the case), you should add a @var{nameregexp}, to |
| 520 | pick out just the tag. This will enable Emacs to find tags more | 526 | pick out just the tag. This will enable Emacs to find tags more |
| 521 | accurately and to do completion on tag names more reliably. You can | 527 | accurately and to do completion on tag names more reliably. You can |
| 522 | find some examples below. | 528 | find some examples below. |
| 523 | 529 | ||
| 524 | The option @samp{--ignore-case-regex} (or @samp{-c}) works like | 530 | A @samp{--regex} option can be restricted to match only files of a |
| 525 | @samp{--regex}, except that matching ignores case. This is | 531 | given language using the optional prefix @var{@{language@}}. This is |
| 526 | appropriate for certain programming languages. | 532 | particularly useful when storing many predefined regular expressions |
| 533 | for @code{etags} in a file. | ||
| 534 | |||
| 535 | The @var{modifiers} are a sequence of 0 or more characters that | ||
| 536 | modify the way @code{etags} does the matching. Without modifiers, | ||
| 537 | each regexp is applied sequentially to each line of the input file, in | ||
| 538 | a case-sensitive way. The modifiers and their meanings are: | ||
| 539 | |||
| 540 | @table @samp | ||
| 541 | @item i | ||
| 542 | ignore case when matching. | ||
| 543 | @item m | ||
| 544 | do not match line by line; rather, match the whole file, so that | ||
| 545 | multi-line matches are possible. | ||
| 546 | @item s | ||
| 547 | implies @samp{m}, and causes dots in @var{tagregexp} to match newlines | ||
| 548 | as well. | ||
| 549 | @end table | ||
| 550 | |||
| 551 | A @var{regexfile} is the name of a file where regular expressions | ||
| 552 | are stored, one per line. Lines beginning with space or tab are | ||
| 553 | ignored, and can be used for adding comments. | ||
| 527 | 554 | ||
| 528 | The @samp{-R} option deletes all the regexps defined with | 555 | The @samp{-R} option deletes all the regexps defined with |
| 529 | @samp{--regex} options. It applies to the file names following it, as | 556 | @samp{--regex} options. It applies to the file names following it, as |