Retrying M-. by means of C-x ESC was causing M-, to get confused
authorChris Hanson <org/chris-hanson/cph>
Sat, 25 Jan 1992 23:11:21 +0000 (23:11 +0000)
committerChris Hanson <org/chris-hanson/cph>
Sat, 25 Jan 1992 23:11:21 +0000 (23:11 +0000)
because the information it needed was being recorded at the time it
was being typed in rather than when M-. was run.

v7/src/edwin/tagutl.scm

index 4471ce83de1cc97f34f49bab41541bbe445c7e1d..d0b4c69cc2d030edba80c5f9357fa5963a8f061b 100644 (file)
@@ -1,8 +1,8 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/tagutl.scm,v 1.45 1991/11/25 21:51:20 arthur Exp $
+;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/tagutl.scm,v 1.46 1992/01/25 23:11:21 cph Exp $
 ;;;
-;;;    Copyright (c) 1986, 1989-91 Massachusetts Institute of Technology
+;;;    Copyright (c) 1986, 1989-92 Massachusetts Institute of Technology
 ;;;
 ;;;    This material was developed by the Scheme project at the
 ;;;    Massachusetts Institute of Technology, Department of
@@ -97,16 +97,11 @@ See documentation of variable tags-file-name."
 \f
 ;;;; Find Tag
 
-(define previous-find-tag-string
-  false)
-
 (define (find-tag-arguments prompt)
   (let ((previous-tag? (command-argument)))
-    (if previous-tag?
-       (list false true)
-       (let ((string (prompt-for-string prompt (find-tag-default))))
-         (set! previous-find-tag-string string)
-         (list string false)))))
+    (list (and (not previous-tag?)
+              (prompt-for-string prompt (find-tag-default)))
+         previous-tag?)))
 
 (define (&find-tag-command string previous-tag? find-file)
   (let ((buffer (tags-table-buffer)))
@@ -115,11 +110,17 @@ See documentation of variable tags-file-name."
                  buffer
                  (buffer-point buffer)
                  find-file)
-       (find-tag string buffer (buffer-start buffer) find-file)))
+       (begin
+         (set! previous-find-tag-string string)
+         (find-tag string buffer (buffer-start buffer) find-file))))
   (set! tags-loop-continuation
-       (lambda () ((ref-command find-tag) false true)))
+       (lambda ()
+         (&find-tag-command false true find-file)))
   unspecific)
 
+(define previous-find-tag-string
+  false)
+
 (define (find-tag-default)
   (let ((end
         (let ((point (current-point)))