From: Karl Heuer Date: Tue, 6 Oct 1998 22:35:51 +0000 (+0000) Subject: (tags-reset-tags-tables): Properly X-Git-Tag: emacs-20.4~1572 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=466886a2192e910f3af0634ea88970ab2b7d5c06;p=emacs.git (tags-reset-tags-tables): Properly find the markers in the old rings that are being discarded. --- diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index fdc73dd47af..94e2c6438bd 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -613,17 +613,17 @@ Returns t if it visits a tags table, or nil if there are no more in the list." (defun tags-reset-tags-tables () "Reset tags state to cancel effect of any previous \\[visit-tags-table] or \\[find-tag]." (interactive) + ;; Clear out the markers we are throwing away. + (let ((i 0)) + (while (< i find-tag-marker-ring-length) + (if (aref (cddr tags-location-ring) i) + (set-marker (aref (cddr tags-location-ring) i) nil)) + (if (aref (cddr find-tag-marker-ring) i) + (set-marker (aref (cddr find-tag-marker-ring) i) nil)) + (setq i (1+ i)))) (setq tags-file-name nil - tags-location-ring (progn - (mapcar (lambda (m) - (set-marker m nil)) - tags-location-ring) - (make-ring find-tag-marker-ring-length)) - find-tag-marker-ring (progn - (mapcar (lambda (m) - (set-marker m nil)) - find-tag-marker-ring) - (make-ring find-tag-marker-ring-length)) + tags-location-ring (make-ring find-tag-marker-ring-length) + find-tag-marker-ring (make-ring find-tag-marker-ring-length) tags-table-list nil tags-table-computed-list nil tags-table-computed-list-for nil