Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
df3eebcb
Commit
df3eebcb
authored
Jun 13, 2002
by
Francesco Potortì
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New {language} and @regexp features.
parent
cc76b311
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
7 deletions
+27
-7
etc/NEWS
etc/NEWS
+14
-5
etc/etags.1
etc/etags.1
+13
-2
No files found.
etc/NEWS
View file @
df3eebcb
...
...
@@ -570,11 +570,11 @@ comparison.
** Etags changes.
*** New syntax for regular expressions, multi-line regular expressions.
The syntax --ignore-case-regexp=/
REGEX/NAME
/ is now undocumented and
retained
only for backward compatibility. The new equivalent syntax is
--regex=/
REGEX/NAME
/i. More generally, it is --regex=/REGEX/NAME/MODS,
where `/NAME' is optional, as usual, and MODS is a string of 0 or
more
characters among `i' (ignore case), `m' (multi-line) and `s'
The syntax --ignore-case-regexp=/
regex
/ is now undocumented and
retained
only for backward compatibility. The new equivalent syntax is
--regex=/
regex
/i. More generally, it is --regex=/
TAG
REGEX/
TAG
NAME/MODS,
where `/
TAG
NAME' is optional, as usual, and MODS is a string of 0 or
more
characters among `i' (ignore case), `m' (multi-line) and `s'
(single-line). The `m' and `s' modifiers behave as in Perl regular
expressions: `m' allows regexps to match more than one line, while `s'
(which implies `m') means that `.' matches newlines. The ability to
...
...
@@ -586,6 +586,15 @@ The escaped character sequence \a, \b, \d, \e, \f, \n, \r, \t, \v,
respectively, stand for the ASCII characters BEL, BS, DEL, ESC, FF, NL,
CR, TAB, VT,
*** Regular expressions can be bound to a given language
The syntax --regex={LANGUAGE}REGEX means that REGEX is used to make tags
only for files of language LANGUAGE, and ignored otherwise. This is
particularly useful when storing regexps in a file.
*** Regular expressions can be read from a file
The --regex=@regexfile option means read the regexps from a file, one
per line. Lines beginning with space or tab are ignored.
*** In Prolog, etags creates tags for rules in addition to predicates.
*** In Perl, packages are tags.
...
...
etc/etags.1
View file @
df3eebcb
...
...
@@ -152,9 +152,11 @@ Make tags based on regexp matching for the files following this option,
in addition to the tags made with the standard parsing based on
language. May be freely intermixed with filenames and the \fB\-R\fP
option. The regexps are cumulative, i.e. each such option will add to
the previous ones. The regexps are of the form:
the previous ones. The regexps are of
one of
the form
s
:
.br
\fB/\fP\fItagregexp/\fP[\fInameregexp\fP\fB/\fP]\fImodifiers\fP
[\fB{\fP\fIlanguage\fP\fB}\fP]\fB/\fP\fItagregexp/\fP[\fInameregexp\fP\fB/\fP]\fImodifiers\fP
.br
\fB@\fP\fIregexfile\fP
.br
where \fItagregexp\fP is used to match the tag. It should not match
...
...
@@ -173,6 +175,15 @@ that the \fItagregexp\fP will be matched against the whole file contents
at once, rather than line by line, and the matching sequence can match
multiple lines; and \fIs\fP, which implies \fIm\fP and means that the
dot character in \fItagregexp\fP matches the newline char as well.
.br
cthe optional \fB{\fP\fIlanguage\fP\fB}\fP means that the tag should be
created only for files of language \fIlanguage\fP, and ignored
otherwise. This is particularly useful when storing many predefined
regexps in a file.
.br
In its second form, \fIregexfile\fP is the name of a file containing
regexps, one per line. Lines beginning with a space or tab are assumed
to be comments, and ignored.
.br
Here are some examples. All the regexps are quoted to protect them
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment