]> git.eshelyaron.com Git - emacs.git/commitdiff
(visit-tags-table-buffer): Don't change VISIT-TAGS-TABLE-BUFFER-CONT when
authorRoland McGrath <roland@gnu.org>
Mon, 31 Jan 1994 23:05:32 +0000 (23:05 +0000)
committerRoland McGrath <roland@gnu.org>
Mon, 31 Jan 1994 23:05:32 +0000 (23:05 +0000)
it is 'same.  Do list verification frobbing for it being either 'same or
nil; but only set tags-table-list-started-at and tags-table-list-pointer
when it's nil.

lisp/progmodes/etags.el

index c39eed6d344d17d3af1b5757bb85fffdce134dc8..ebfdb910cb68c1b121a2387a5639c0b069d0ec3f 100644 (file)
@@ -1,6 +1,6 @@
 ;;; etags.el --- etags facility for Emacs
 
-;; Copyright (C) 1985, 1986, 1988, 1989, 1992, 1993
+;; Copyright (C) 1985, 1986, 1988, 1989, 1992, 1993, 1994
 ;;     Free Software Foundation, Inc.
 
 ;; Author: Roland McGrath <roland@gnu.ai.mit.edu>
@@ -359,20 +359,18 @@ Returns t if it visits a tags table, or nil if there are no more in the list."
           (or tags-file-name
               (error (substitute-command-keys
                       (concat "No tags table in use!  "
-                              "Use \\[visit-tags-table] to select one."))))
-          ;; Set VISIT-TAGS-TABLE-BUFFER-CONT to nil
-          ;; so the code below will make sure tags-file-name
-          ;; is in tags-table-list.
-          (setq visit-tags-table-buffer-cont nil))
+                              "Use \\[visit-tags-table] to select one.")))))
 
          (visit-tags-table-buffer-cont
           ;; Find the next table.
           (if (tags-next-table)
               ;; Skip over nonexistent files.
-              (while (and (let ((file (tags-expand-table-name tags-file-name)))
+              (let (file)
+                (while (and (setq file
+                                  (tags-expand-table-name tags-file-name))
                             (not (or (get-file-buffer file)
                                      (file-exists-p file))))
-                          (tags-next-table)))))
+                  (tags-next-table)))))
 
          (t
           ;; Pick a table out of our hat.
@@ -423,7 +421,8 @@ Returns t if it visits a tags table, or nil if there are no more in the list."
     ;; Expand the table name into a full file name.
     (setq tags-file-name (tags-expand-table-name tags-file-name))
 
-    (if (and (eq visit-tags-table-buffer-cont t) (null tags-table-list-pointer))
+    (if (and (eq visit-tags-table-buffer-cont t)
+            (null tags-table-list-pointer))
        ;; All out of tables.
        nil
 
@@ -457,50 +456,51 @@ Returns t if it visits a tags table, or nil if there are no more in the list."
            ;; doesn't get in the user's way.
            (bury-buffer (current-buffer))
 
-           (if visit-tags-table-buffer-cont
-               ;; No list frobbing required.
-               nil
-
-             ;; Look in the list for the table we chose.
-             (let ((elt (tags-table-list-member tags-file-name)))
-               (or elt
-                   ;; The table is not in the current set.
-                   ;; Try to find it in another previously used set.
-                   (let ((sets tags-table-set-list))
-                     (while (and sets
-                                 (not (setq elt (tags-table-list-member
-                                                 tags-file-name (car sets)))))
-                       (setq sets (cdr sets)))
-                     (if sets
-                         ;; Found in some other set.  Switch to that set.
-                         (progn
+           (if (memq visit-tags-table-buffer-cont '(same nil))
+               ;; Look in the list for the table we chose.
+               (let ((elt (tags-table-list-member tags-file-name)))
+                 (or elt
+                     ;; The table is not in the current set.
+                     ;; Try to find it in another previously used set.
+                     (let ((sets tags-table-set-list))
+                       (while (and sets
+                                   (not (setq elt
+                                              (tags-table-list-member
+                                               tags-file-name (car sets)))))
+                         (setq sets (cdr sets)))
+                       (if sets
+                           ;; Found in some other set.  Switch to that set.
+                           (progn
+                             (or (memq tags-table-list tags-table-set-list)
+                                 ;; Save the current list.
+                                 (setq tags-table-set-list
+                                       (cons tags-table-list
+                                             tags-table-set-list)))
+                             (setq tags-table-list (car sets)))
+
+                         ;; Not found in any existing set.
+                         (if (and tags-table-list
+                                  (or tags-add-tables
+                                      (y-or-n-p
+                                       (concat "Keep current list of "
+                                               "tags tables also? "))))
+                             ;; Add it to the current list.
+                             (setq tags-table-list (cons tags-file-name
+                                                         tags-table-list))
+                           ;; Make a fresh list, and store the old one.
+                           (message "Starting a new list of tags tables")
                            (or (memq tags-table-list tags-table-set-list)
-                               ;; Save the current list.
                                (setq tags-table-set-list
                                      (cons tags-table-list
                                            tags-table-set-list)))
-                           (setq tags-table-list (car sets)))
-
-                       ;; Not found in any existing set.
-                       (if (and tags-table-list
-                                (or tags-add-tables
-                                    (y-or-n-p (concat "Keep current list of"
-                                                      " tags tables also? "))))
-                           ;; Add it to the current list.
-                           (setq tags-table-list (cons tags-file-name
-                                                       tags-table-list))
-                         ;; Make a fresh list, and store the old one.
-                         (message "Starting a new list of tags tables")
-                         (or (memq tags-table-list tags-table-set-list)
-                             (setq tags-table-set-list
-                                   (cons tags-table-list tags-table-set-list)))
-                         (setq tags-table-list (list tags-file-name)))
-                       (setq elt tags-table-list))))
-
-               ;; Set the tags table list state variables to point at the table
-               ;; we want to use first.
-               (setq tags-table-list-started-at elt
-                     tags-table-list-pointer elt)))
+                           (setq tags-table-list (list tags-file-name)))
+                         (setq elt tags-table-list))))
+
+                 (or visit-tags-table-buffer-cont
+                     ;; Set the tags table list state variables to point
+                     ;; at the table we want to use first.
+                     (setq tags-table-list-started-at elt
+                           tags-table-list-pointer elt))))
 
            ;; Return of t says the tags table is valid.
            t)