diff options
| author | Roland McGrath | 1994-11-15 02:38:03 +0000 |
|---|---|---|
| committer | Roland McGrath | 1994-11-15 02:38:03 +0000 |
| commit | 82f75ccadb3e1c680686dc0312c4d6660a9ee8f1 (patch) | |
| tree | 6ecfd2475a95a1844e3053dd88aa95f91647b566 | |
| parent | 6cb9cafb122bed8ba17617c6890dad6d55e0723c (diff) | |
| download | emacs-82f75ccadb3e1c680686dc0312c4d6660a9ee8f1.tar.gz emacs-82f75ccadb3e1c680686dc0312c4d6660a9ee8f1.zip | |
(tags-table-including): Don't gratuitously cons (what was I thinking?).
Properly skip t elements of tags-table-computed-list.
| -rw-r--r-- | lisp/progmodes/etags.el | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 2cab15afec2..0ed8cd2f118 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el | |||
| @@ -365,20 +365,25 @@ Returns non-nil iff it is a valid table." | |||
| 365 | (setq tables (cdr tables))) | 365 | (setq tables (cdr tables))) |
| 366 | (if found | 366 | (if found |
| 367 | ;; Now determine if the table we found was one included by another | 367 | ;; Now determine if the table we found was one included by another |
| 368 | ;; table, not explicitly listed. | 368 | ;; table, not explicitly listed. We do this by checking each |
| 369 | ;; element of the computed list to see if it appears in the user's | ||
| 370 | ;; explicit list; the last element we will check is FOUND itself. | ||
| 371 | ;; Then we return the last one which did in fact appear in | ||
| 372 | ;; tags-table-list. | ||
| 369 | (let ((could-be nil) | 373 | (let ((could-be nil) |
| 370 | (elt tags-table-computed-list)) | 374 | (elt tags-table-computed-list)) |
| 371 | (while (not (eq elt (cdr found))) | 375 | (while (not (eq elt (cdr found))) |
| 372 | (if (tags-table-list-member (car elt) tags-table-list) | 376 | (if (tags-table-list-member (car elt) tags-table-list) |
| 373 | ;; This table appears in the user's list, so it could be | 377 | ;; This table appears in the user's list, so it could be |
| 374 | ;; the one which includes the table we found. | 378 | ;; the one which includes the table we found. |
| 375 | (setq could-be (cons (car elt) could-be))) | 379 | (setq could-be (car elt))) |
| 376 | (setq elt (cdr elt))) | 380 | (setq elt (cdr elt)) |
| 381 | (if (eq t (car elt)) | ||
| 382 | (setq elt (cdr elt)))) | ||
| 377 | ;; The last element we found in the computed list before FOUND | 383 | ;; The last element we found in the computed list before FOUND |
| 378 | ;; that appears in the user's list will be the table that | 384 | ;; that appears in the user's list will be the table that |
| 379 | ;; included the one we found. This will be the head of the | 385 | ;; included the one we found. |
| 380 | ;; COULD-BE list. | 386 | could-be)))) |
| 381 | (car could-be))))) | ||
| 382 | 387 | ||
| 383 | ;; Subroutine of visit-tags-table-buffer. Move tags-table-list-pointer | 388 | ;; Subroutine of visit-tags-table-buffer. Move tags-table-list-pointer |
| 384 | ;; along and set tags-file-name. Returns nil when out of tables. | 389 | ;; along and set tags-file-name. Returns nil when out of tables. |