diff options
| author | Francesco Potortì | 2007-11-22 11:31:48 +0000 |
|---|---|---|
| committer | Francesco Potortì | 2007-11-22 11:31:48 +0000 |
| commit | f96732e5b794b1683e79339314d341606c325d3f (patch) | |
| tree | 3bec58d132503b99264e44d11a3a9e714b976815 /lib-src | |
| parent | 63f018cd94f728200c16bcbe2b8202ceb7a1d4eb (diff) | |
| download | emacs-f96732e5b794b1683e79339314d341606c325d3f.tar.gz emacs-f96732e5b794b1683e79339314d341606c325d3f.zip | |
(default_C_help) [CTAGS]: differentiate the help string,
as the defaults in ctags are different from etags.
(default_C_help, Cplusplus_help, PHP_help, print_help): Remove
text saying --members is the default: not true in Emacs 22.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/etags.c | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/lib-src/etags.c b/lib-src/etags.c index 47db26a5dd7..a922d5672c5 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c | |||
| @@ -501,7 +501,7 @@ static bool update; /* -u: update tags */ | |||
| 501 | static bool vgrind_style; /* -v: create vgrind style index output */ | 501 | static bool vgrind_style; /* -v: create vgrind style index output */ |
| 502 | static bool no_warnings; /* -w: suppress warnings (undocumented) */ | 502 | static bool no_warnings; /* -w: suppress warnings (undocumented) */ |
| 503 | static bool cxref_style; /* -x: create cxref style output */ | 503 | static bool cxref_style; /* -x: create cxref style output */ |
| 504 | static bool cplusplus; /* .[hc] means C++, not C */ | 504 | static bool cplusplus; /* .[hc] means C++, not C (undocumented) */ |
| 505 | static bool ignoreindent; /* -I: ignore indentation in C */ | 505 | static bool ignoreindent; /* -I: ignore indentation in C */ |
| 506 | static bool packages_only; /* --packages-only: in Ada, only tag packages*/ | 506 | static bool packages_only; /* --packages-only: in Ada, only tag packages*/ |
| 507 | 507 | ||
| @@ -608,20 +608,29 @@ followed by a colon, are tags."; | |||
| 608 | 608 | ||
| 609 | 609 | ||
| 610 | /* Note that .c and .h can be considered C++, if the --c++ flag was | 610 | /* Note that .c and .h can be considered C++, if the --c++ flag was |
| 611 | given, or if the `class' or `template' keyowrds are met inside the file. | 611 | given, or if the `class' or `template' keywords are met inside the file. |
| 612 | That is why default_C_entries is called for these. */ | 612 | That is why default_C_entries is called for these. */ |
| 613 | static char *default_C_suffixes [] = | 613 | static char *default_C_suffixes [] = |
| 614 | { "c", "h", NULL }; | 614 | { "c", "h", NULL }; |
| 615 | #if CTAGS /* C help for Ctags */ | ||
| 616 | static char default_C_help [] = | ||
| 617 | "In C code, any C function is a tag. Use -t to tag typedefs.\n\ | ||
| 618 | Use -T to tag definitions of `struct', `union' and `enum'.\n\ | ||
| 619 | Use -d to tag `#define' macro definitions and `enum' constants.\n\ | ||
| 620 | Use --globals to tag global variables.\n\ | ||
| 621 | You can tag function declarations and external variables by\n\ | ||
| 622 | using `--declarations', and struct members by using `--members'."; | ||
| 623 | #else /* C help for Etags */ | ||
| 615 | static char default_C_help [] = | 624 | static char default_C_help [] = |
| 616 | "In C code, any C function or typedef is a tag, and so are\n\ | 625 | "In C code, any C function or typedef is a tag, and so are\n\ |
| 617 | definitions of `struct', `union' and `enum'. `#define' macro\n\ | 626 | definitions of `struct', `union' and `enum'. `#define' macro\n\ |
| 618 | definitions and `enum' constants are tags unless you specify\n\ | 627 | definitions and `enum' constants are tags unless you specify\n\ |
| 619 | `--no-defines'. Global variables are tags unless you specify\n\ | 628 | `--no-defines'. Global variables are tags unless you specify\n\ |
| 620 | `--no-globals' and so are struct members unless you specify\n\ | 629 | `--no-globals'. Use of `--no-globals' and `--no-defines'\n\ |
| 621 | `--no-members'. Use of `--no-globals', `--no-defines' and\n\ | 630 | can make the tags table file much smaller.\n\ |
| 622 | `--no-members' can make the tags table file much smaller.\n\ | ||
| 623 | You can tag function declarations and external variables by\n\ | 631 | You can tag function declarations and external variables by\n\ |
| 624 | using `--declarations'."; | 632 | using `--declarations', and struct members by using `--members'."; |
| 633 | #endif /* C help for Ctags and Etags */ | ||
| 625 | 634 | ||
| 626 | static char *Cplusplus_suffixes [] = | 635 | static char *Cplusplus_suffixes [] = |
| 627 | { "C", "c++", "cc", "cpp", "cxx", "H", "h++", "hh", "hpp", "hxx", | 636 | { "C", "c++", "cc", "cpp", "cxx", "H", "h++", "hh", "hpp", "hxx", |
| @@ -632,7 +641,7 @@ static char Cplusplus_help [] = | |||
| 632 | "In C++ code, all the tag constructs of C code are tagged. (Use\n\ | 641 | "In C++ code, all the tag constructs of C code are tagged. (Use\n\ |
| 633 | --help --lang=c --lang=c++ for full help.)\n\ | 642 | --help --lang=c --lang=c++ for full help.)\n\ |
| 634 | In addition to C tags, member functions are also recognized. Member\n\ | 643 | In addition to C tags, member functions are also recognized. Member\n\ |
| 635 | variables are recognized unless you use the `--no-members' option.\n\ | 644 | variables are also recognized if you use the `--members' option.\n\ |
| 636 | Tags for variables and functions in classes are named `CLASS::VARIABLE'\n\ | 645 | Tags for variables and functions in classes are named `CLASS::VARIABLE'\n\ |
| 637 | and `CLASS::FUNCTION'. `operator' definitions have tag names like\n\ | 646 | and `CLASS::FUNCTION'. `operator' definitions have tag names like\n\ |
| 638 | `operator+'."; | 647 | `operator+'."; |
| @@ -727,8 +736,8 @@ defined in the default package is `main::SUB'."; | |||
| 727 | static char *PHP_suffixes [] = | 736 | static char *PHP_suffixes [] = |
| 728 | { "php", "php3", "php4", NULL }; | 737 | { "php", "php3", "php4", NULL }; |
| 729 | static char PHP_help [] = | 738 | static char PHP_help [] = |
| 730 | "In PHP code, tags are functions, classes and defines. Unless you use\n\ | 739 | "In PHP code, tags are functions, classes and defines. When using\n\ |
| 731 | the `--no-members' option, vars are tags too."; | 740 | the `--members' option, vars are tags too."; |
| 732 | 741 | ||
| 733 | static char *plain_C_suffixes [] = | 742 | static char *plain_C_suffixes [] = |
| 734 | { "pc", /* Pro*C file */ | 743 | { "pc", /* Pro*C file */ |
| @@ -970,9 +979,8 @@ Relative ones are stored relative to the output file's directory.\n"); | |||
| 970 | puts ("--no-globals\n\ | 979 | puts ("--no-globals\n\ |
| 971 | Do not create tag entries for global variables in some\n\ | 980 | Do not create tag entries for global variables in some\n\ |
| 972 | languages. This makes the tags file smaller."); | 981 | languages. This makes the tags file smaller."); |
| 973 | puts ("--no-members\n\ | 982 | puts ("--members\n\ |
| 974 | Do not create tag entries for members of structures\n\ | 983 | Create tag entries for members of structures in some languages."); |
| 975 | in some languages."); | ||
| 976 | 984 | ||
| 977 | puts ("-r REGEXP, --regex=REGEXP or --regex=@regexfile\n\ | 985 | puts ("-r REGEXP, --regex=REGEXP or --regex=@regexfile\n\ |
| 978 | Make a tag for each line matching a regular expression pattern\n\ | 986 | Make a tag for each line matching a regular expression pattern\n\ |
| @@ -1210,8 +1218,8 @@ main (argc, argv) | |||
| 1210 | 1218 | ||
| 1211 | /* | 1219 | /* |
| 1212 | * If etags, always find typedefs and structure tags. Why not? | 1220 | * If etags, always find typedefs and structure tags. Why not? |
| 1213 | * Also default to find macro constants, enum constants, struct | 1221 | * Also default to find macro constants, enum constants and |
| 1214 | * members and global variables. | 1222 | * global variables. |
| 1215 | */ | 1223 | */ |
| 1216 | if (!CTAGS) | 1224 | if (!CTAGS) |
| 1217 | { | 1225 | { |
| @@ -3402,7 +3410,7 @@ C_entries (c_ext, inf) | |||
| 3402 | { | 3410 | { |
| 3403 | c = '\0'; | 3411 | c = '\0'; |
| 3404 | } | 3412 | } |
| 3405 | break; | 3413 | break; |
| 3406 | case '%': | 3414 | case '%': |
| 3407 | if ((c_ext & YACC) && *lp == '%') | 3415 | if ((c_ext & YACC) && *lp == '%') |
| 3408 | { | 3416 | { |