; Pain-in-the-xxx postprocessing necessary for converting .me to .html.  The
; real work of the conversion is done in ./me2html.el, q.v.  All cleanup-echos
; does is remove the command-name text that emacs echos during batch mode.  It
; also deletes excess blank lines at the beginning and the end of the html
; file.
;
; Before the fink-based emacs, the results of this file were output to
; std{out,err} via the echo-file function.  The problem with this in fink emacs
; is that the POS "loading 00fink-vars" echo shows up on stdout.  Hence,
; instead of the stdout echoing, the file is just save.  See the way things are
; invoked in the me2html shell script.
;
(defun dot () (point))

(defun cleanup-echos ()
    (setq outfile (nth 2 command-line-args))
    (message outfile)
    (beginning-of-buffer)
    (setq d (dot))
    (search-forward "$$$$$$$$$$$$$$$$$$$ REAL BEGINNING $$$$$$$$$$$$$$$$$$$")
    (forward-char 1)
    (kill-region d (dot))
    (save-buffer)
;   (echo-file)
)

(defun echo-file ()
"Stream the current file to stdout via (message)."
    (interactive)
    (while (not (eobp))
      (progn
	(setq d (dot))
	(end-of-line)
	(message "%s" (buffer-substring d (dot)))
	(beginning-of-line)
	(forward-line 1)
      )
    )
)