1210 |
;; Return non-nil iff the current buffer is a valid etags TAGS file. |
;; Return non-nil iff the current buffer is a valid etags TAGS file. |
1211 |
(defun etags-verify-tags-table () |
(defun etags-verify-tags-table () |
1212 |
;; Use eq instead of = in case char-after returns nil. |
;; Use eq instead of = in case char-after returns nil. |
1213 |
(eq (char-after 1) ?\f)) |
(eq (char-after (point-min)) ?\f)) |
1214 |
|
|
1215 |
(defun etags-file-of-tag () |
(defun etags-file-of-tag () |
1216 |
(save-excursion |
(save-excursion |
1254 |
;; the beginning of the file. |
;; the beginning of the file. |
1255 |
(setq tag-text t |
(setq tag-text t |
1256 |
line nil |
line nil |
1257 |
startpos 1) |
startpos (point-min)) |
1258 |
|
|
1259 |
;; Find the end of the tag and record the whole tag text. |
;; Find the end of the tag and record the whole tag text. |
1260 |
(search-forward "\177") |
(search-forward "\177") |
1336 |
(beginning-of-line))) |
(beginning-of-line))) |
1337 |
|
|
1338 |
(defun etags-list-tags (file) |
(defun etags-list-tags (file) |
1339 |
(goto-char 1) |
(goto-char (point-min)) |
1340 |
(when (search-forward (concat "\f\n" file ",") nil t) |
(when (search-forward (concat "\f\n" file ",") nil t) |
1341 |
(forward-line 1) |
(forward-line 1) |
1342 |
(while (not (or (eobp) (looking-at "\f"))) |
(while (not (or (eobp) (looking-at "\f"))) |
1401 |
(princ "Tags in file `") |
(princ "Tags in file `") |
1402 |
(tags-with-face 'highlight (princ buffer-file-name)) |
(tags-with-face 'highlight (princ buffer-file-name)) |
1403 |
(princ "':\n\n")) |
(princ "':\n\n")) |
1404 |
(goto-char 1) |
(goto-char (point-min)) |
1405 |
(while (re-search-forward string nil t) |
(while (re-search-forward string nil t) |
1406 |
(beginning-of-line) |
(beginning-of-line) |
1407 |
(let ((tag (buffer-substring (point) |
(let ((tag (buffer-substring (point) |
1841 |
(prin1 (car set-list) (current-buffer)) ;invisible |
(prin1 (car set-list) (current-buffer)) ;invisible |
1842 |
(insert "\n") |
(insert "\n") |
1843 |
(setq set-list (delete (car set-list) set-list))) |
(setq set-list (delete (car set-list) set-list))) |
1844 |
(goto-char 1) |
(goto-char (point-min)) |
1845 |
(insert-before-markers |
(insert-before-markers |
1846 |
"Type `t' to select a tags table or set of tags tables:\n\n") |
"Type `t' to select a tags table or set of tags tables:\n\n") |
1847 |
(if desired-point |
(if desired-point |