# HG changeset patch # User Roland McGrath # Date 767914903 0 # Node ID 87be9630459d51b53c9b4ac786f85e541cc45749 # Parent 3dc9a9e95d32ab3318e3e874ec2ed0f637ac7a21 (tags-find-table-in-list): Only recurse if (tags-included-tables) returns non-nil (avoid infinite recursion). diff -r 3dc9a9e95d32 -r 87be9630459d lisp/progmodes/etags.el --- a/lisp/progmodes/etags.el Mon May 02 21:24:16 1994 +0000 +++ b/lisp/progmodes/etags.el Mon May 02 21:41:43 1994 +0000 @@ -294,22 +294,24 @@ (let ((tags-file-name this-file) found) (visit-tags-table-buffer 'same) - (if (tags-find-table-in-list file recursing-move-to - (tags-included-tables)) - (progn - ;; We found FILE in the included table. - (if move-to - (progn - ;; The recursive call has already frobbed the list - ;; pointers. It set tags-table-parent-pointer-list - ;; to a list including RECURSING-MOVE-TO. Now we - ;; must mutate that cons so its list pointers show - ;; the position where we found this included table. - (setcar (cdr (car recursing-move-to)) list) - (setcar (cdr (cdr (car recursing-move-to))) list) - ;; Don't do further list frobnication below. - (setq move-to nil))) - (setq list t)))))) + (and (tags-included-tables) + ;; We have some included tables; check them. + (tags-find-table-in-list file recursing-move-to + tags-included-tables) + (progn + ;; We found FILE in the included table. + (if move-to + (progn + ;; The recursive call has already frobbed the list + ;; pointers. It set tags-table-parent-pointer-list + ;; to a list including RECURSING-MOVE-TO. Now we + ;; must mutate that cons so its list pointers show + ;; the position where we found this included table. + (setcar (cdr (car recursing-move-to)) list) + (setcar (cdr (cdr (car recursing-move-to))) list) + ;; Don't do further list frobnication below. + (setq move-to nil))) + (setq list t)))))) (if (consp list) (setq list (cdr list)))) (and list move-to