Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
4a92b718
Commit
4a92b718
authored
Apr 01, 1993
by
Roland McGrath
Browse files
(etags-tags-completion-table): Rewritten with a mondo regexp.
parent
77328ee1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
lisp/progmodes/etags.el
lisp/progmodes/etags.el
+18
-18
No files found.
lisp/progmodes/etags.el
View file @
4a92b718
...
...
@@ -851,24 +851,24 @@ See documentation of variable `tags-file-name'."
(
let
((
table
(
make-vector
511
0
)))
(
save-excursion
(
goto-char
(
point-min
))
(
while
(
search-forward
"\177"
nil
t
)
;; Handle multiple \177's on a line.
(
save-excursion
(
skip-syntax-backward
"w_"
)
(
or
(
bolp
)
(
intern
(
buffer-substring
(
point
)
(
progn
(
skip-syntax-backward
"w_"
)
;; ??? New
;; `::' in the middle of a C++ tag.
(
and
(
=
(
preceding-char
)
?:
)
(
=
(
char-after
(
-
(
point
)
2
))
?:
)
(
progn
(
backward-char
2
)
(
skip-syntax-backward
"w_"
)))
(
point
)))
table
)))
))
;; This monster regexp matches an etags tag line.
;; \1 is the string to match;
;; \2 is not interesting;
;; \3 is the guessed tag name; XXX guess should be better eg DEFUN
;; \4 is the char to start searching at;
;; \5 is the line to start searching at;
;; \6 is not interesting;
;;
\7 is the explicitly-specified tag name.
(
while
(
re-search-forward
"
^\\
(
\\
(
.
+[
\t]+\\
)
?\\
(
[-a-zA-Z0-9_$]+\\
)
[^-a-zA-Z0-9_$]*\\
)
\177
\
\\
(
[0-9]+\\
)
,
\\
(
[0-9]+\\
)
\\
(
,
\001\\
(
[^\n]+\\
)
\\
)
?\n
"
nil t
)
(intern (if (match-beginning 6
)
;; There is an explicit tag name.
(buffer-substring (match-beginning 6) (match-end 6)
)
;; No explicit tag name. Best guess.
(
buffer-substring (match-beginning 3) (match-end 3
)))
table)))
table))
(defun etags-snarf-tag ()
...
...
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