diff options
| author | Richard M. Stallman | 1993-11-09 07:13:00 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-11-09 07:13:00 +0000 |
| commit | 274d013d9ec4ed86a5e1355cc79a106b9d4b3a57 (patch) | |
| tree | f39020e26f58a7ec99468fe5ed0bee256fe43deb | |
| parent | 91d752825d563e187bd3e3145a0b278b9a6cb528 (diff) | |
| download | emacs-274d013d9ec4ed86a5e1355cc79a106b9d4b3a57.tar.gz emacs-274d013d9ec4ed86a5e1355cc79a106b9d4b3a57.zip | |
(etags-list-tags): Return t if found the file.
(list-tags): Clear first-time when we go around the loop.
Supply file name in error message.
Remove dir names from files when preparing for completion.
| -rw-r--r-- | lisp/progmodes/etags.el | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 2271614fd94..4b2e49bad9f 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el | |||
| @@ -386,8 +386,8 @@ Returns t if it visits a tags table, or nil if there are no more in the list." | |||
| 386 | (car (or | 386 | (car (or |
| 387 | ;; First check only tables already in buffers. | 387 | ;; First check only tables already in buffers. |
| 388 | (save-excursion (tags-table-including buffer-file-name | 388 | (save-excursion (tags-table-including buffer-file-name |
| 389 | tags-table-list | 389 | tags-table-list |
| 390 | t)) | 390 | t)) |
| 391 | ;; Since that didn't find any, now do the | 391 | ;; Since that didn't find any, now do the |
| 392 | ;; expensive version: reading new files. | 392 | ;; expensive version: reading new files. |
| 393 | (save-excursion (tags-table-including buffer-file-name | 393 | (save-excursion (tags-table-including buffer-file-name |
| @@ -992,7 +992,8 @@ See documentation of variable `tags-file-name'." | |||
| 992 | (progn (skip-chars-forward "^\177") | 992 | (progn (skip-chars-forward "^\177") |
| 993 | (point)))) | 993 | (point)))) |
| 994 | (terpri) | 994 | (terpri) |
| 995 | (forward-line 1)))) | 995 | (forward-line 1)) |
| 996 | t)) | ||
| 996 | 997 | ||
| 997 | (defun etags-tags-apropos (string) | 998 | (defun etags-tags-apropos (string) |
| 998 | (goto-char 1) | 999 | (goto-char 1) |
| @@ -1247,12 +1248,13 @@ See documentation of variable `tags-file-name'." | |||
| 1247 | ;;;###autoload | 1248 | ;;;###autoload |
| 1248 | (defun list-tags (file) | 1249 | (defun list-tags (file) |
| 1249 | "Display list of tags in file FILE. | 1250 | "Display list of tags in file FILE. |
| 1250 | FILE should not contain a directory specification | 1251 | FILE should not contain a directory specification." |
| 1251 | unless it has one in the tags table." | ||
| 1252 | (interactive (list (completing-read "List tags in file: " | 1252 | (interactive (list (completing-read "List tags in file: " |
| 1253 | (save-excursion | 1253 | (save-excursion |
| 1254 | (visit-tags-table-buffer) | 1254 | (visit-tags-table-buffer) |
| 1255 | (mapcar 'list (tags-table-files))) | 1255 | (mapcar 'list |
| 1256 | (mapcar 'file-name-nondirectory | ||
| 1257 | (tags-table-files)))) | ||
| 1256 | nil t nil))) | 1258 | nil t nil))) |
| 1257 | (with-output-to-temp-buffer "*Tags List*" | 1259 | (with-output-to-temp-buffer "*Tags List*" |
| 1258 | (princ "Tags in file ") | 1260 | (princ "Tags in file ") |
| @@ -1262,10 +1264,11 @@ unless it has one in the tags table." | |||
| 1262 | (let ((first-time t) | 1264 | (let ((first-time t) |
| 1263 | (gotany nil)) | 1265 | (gotany nil)) |
| 1264 | (while (visit-tags-table-buffer (not first-time)) | 1266 | (while (visit-tags-table-buffer (not first-time)) |
| 1267 | (setq first-time nil) | ||
| 1265 | (if (funcall list-tags-function file) | 1268 | (if (funcall list-tags-function file) |
| 1266 | (setq gotany t))) | 1269 | (setq gotany t))) |
| 1267 | (or gotany | 1270 | (or gotany |
| 1268 | (error "File %s not in current tags tables")))))) | 1271 | (error "File %s not in current tags tables" file)))))) |
| 1269 | 1272 | ||
| 1270 | ;;;###autoload | 1273 | ;;;###autoload |
| 1271 | (defun tags-apropos (regexp) | 1274 | (defun tags-apropos (regexp) |