diff options
| -rw-r--r-- | lisp/progmodes/etags.el | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index b1aae1b2db5..45528ccef8f 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el | |||
| @@ -851,24 +851,24 @@ See documentation of variable `tags-file-name'." | |||
| 851 | (let ((table (make-vector 511 0))) | 851 | (let ((table (make-vector 511 0))) |
| 852 | (save-excursion | 852 | (save-excursion |
| 853 | (goto-char (point-min)) | 853 | (goto-char (point-min)) |
| 854 | (while (search-forward "\177" nil t) | 854 | ;; This monster regexp matches an etags tag line. |
| 855 | ;; Handle multiple \177's on a line. | 855 | ;; \1 is the string to match; |
| 856 | (save-excursion | 856 | ;; \2 is not interesting; |
| 857 | (skip-syntax-backward "w_") | 857 | ;; \3 is the guessed tag name; XXX guess should be better eg DEFUN |
| 858 | (or (bolp) | 858 | ;; \4 is the char to start searching at; |
| 859 | (intern (buffer-substring | 859 | ;; \5 is the line to start searching at; |
| 860 | (point) | 860 | ;; \6 is not interesting; |
| 861 | (progn | 861 | ;; \7 is the explicitly-specified tag name. |
| 862 | (skip-syntax-backward "w_") | 862 | (while (re-search-forward |
| 863 | ;; ??? New | 863 | "^\\(\\(.+[ \t]+\\)?\\([-a-zA-Z0-9_$]+\\)[^-a-zA-Z0-9_$]*\\)\177\ |
| 864 | ;; `::' in the middle of a C++ tag. | 864 | \\([0-9]+\\),\\([0-9]+\\)\\(,\001\\([^\n]+\\)\\)?\n" |
| 865 | (and (= (preceding-char) ?:) | 865 | nil t) |
| 866 | (= (char-after (- (point) 2)) ?:) | 866 | (intern (if (match-beginning 6) |
| 867 | (progn | 867 | ;; There is an explicit tag name. |
| 868 | (backward-char 2) | 868 | (buffer-substring (match-beginning 6) (match-end 6)) |
| 869 | (skip-syntax-backward "w_"))) | 869 | ;; No explicit tag name. Best guess. |
| 870 | (point))) | 870 | (buffer-substring (match-beginning 3) (match-end 3))) |
| 871 | table))))) | 871 | table))) |
| 872 | table)) | 872 | table)) |
| 873 | 873 | ||
| 874 | (defun etags-snarf-tag () | 874 | (defun etags-snarf-tag () |