(defun lookup-symbol ()
  (interactive)
  (setq real-buf (current-buffer))
  (forward-word 1)
  (setq eow (point))
  (forward-word -1)
  (setq symbol (buffer-substring (point) eow))
  (if (get-buffer "symbol-index")
      (switch-to-buffer "symbol-index")
    (find-file-read-only "~ksos/src/kernel/symbol-index")
    )
  (goto-char 0)
  (message (if (search-forward (concat "\n" symbol " ") nil t)
	       (buffer-substring (progn (beginning-of-line) (point))
				 (progn (end-of-line) (point))
		)
	     (concat symbol " not found")
	     ))
  (switch-to-buffer real-buf)
  )
