(defun spectree ()
  (interactive "*")
  (setq default-directory "./")
  (setq buffer-file-name "spectree")
  (setq case-fold-search nil)
  (switch-to-buffer "specnames")
  (goto-char (point-min))
  (while (< (point) (point-max))
    (copy-to-register ?n (point) (progn (end-of-line) (point)) nil)
    (beginning-of-line 2)
    (switch-to-buffer "Tree")
    (goto-char (point-min))
    (while (re-search-forward (concat " " (get-register ?n) "[ \^J]") nil t)
      (backward-char 2)
      (beginning-of-line)
      (forward-char 4)
      (delete-char 1)
      (insert-string "*")
      (beginning-of-line 2)
      )
    (switch-to-buffer "specnames")
    )
  (switch-to-buffer "Tree")
  )
