     (end-of-buffer))
   (beginning-of-line))
 
-(defvar *pending-specware-meta-point-results* nil)
-
-(defun sw:continue-meta-point ()
-  "Continue last \"\\[sw:meta-point]\" command."
+(defvar *pending-specware-search-results* nil)
+
+;;; supersedes sw:continue-meta-point
+(defun sw:continue-specware-search ()
+  "Continue last Specware find command."
   (interactive)
-  (if (null *pending-specware-meta-point-results*)
-      (error "No more Definitions")
-    (goto-specware-meta-point-definition
-     (car *pending-specware-meta-point-results*)
-     (cdr *pending-specware-meta-point-results*))))
+  (if (null *pending-specware-search-results*)
+      (error "No more results")
+    (let ((next-results (pop *pending-specware-search-results*)))
+      (if (eq (car next-results) 'meta-point)
+	(goto-specware-meta-point-definition
+	 (cadr next-results)
+	 (cddr next-results))
+      (goto-specware-search-result
+	 (cadr next-results)
+	 (cddr next-results))))))
+
+(defun sw:ignore-matches (all)
+  (interactive "P")
+  (if all
+      (setq *pending-specware-search-results* nil)
+    (pop *pending-specware-search-results*))
+  (report-next-match-task-status))
 
 ;;;; Meta-point facility (adapted from refine-meta-point fi:lisp-find-definition)
 (defun sw:meta-point (name)

(defun sw:process-current-file ()
  (interactive)
  (save-buffer)
  (let ((filename (sw::file-to-specware-unit-id buffer-file-name)))
    (lisp-or-specware-command ":sw " "proc " filename)))

(defun sw::file-to-specware-unit-id (filename)
  (let ((len (length filename)))
    (when (equal ".sw" (substring filename (- len 3)))
      (setq filename (substring filename 0 (- len 3))))
    (setq filename (sw::normalize-filename filename))
    (setq filename (name-relative-to-swpath filename))
    (when (eq (elt filename 1) ?:)
      (setq filename (substring filename 2)))
    filename))

(defun sw:containing-specware-unit-id ()
  (save-excursion
    (end-of-line)
    (let* ((file-uid (sw::file-to-specware-unit-id buffer-file-name))
	   (match (sw:re-search-backward sw:basic-unit-intro-regexp)))
      (if match
	  (concat file-uid "#" (match-string 1))


(defun sw:process-unit (unitid)
  (interactive (list (read-from-minibuffer "Process Unit: "
					   (sw:containing-specware-unit-id t))))
  (save-buffer)
  (lisp-or-specware-command ":sw " "proc " unitid))

