;  This autoloaded file implements the "i" command of mhe
(defun 
    (&mh-inc old-folder
	(&mh-save-killbuffer)
	(setq old-folder mh-folder)
	(if (!= mh-folder "inbox")
	    (save-window-excursion  ffl
		(setq ffl (get-folder-name "inc into" "inbox" 1))
		(&mh-read-folder ffl "" t-buffer-filename ffl)
	    )
	)
	(message "Checking for new mail...") (sit-for 0)
	(send-to-shell (concat mh-progs "/inc +" mh-folder))
	(temp-use-buffer "mh-temp")
	(beginning-of-file)
	(if (looking-at "^Incorporating")
	    (progn 
		   (pop-to-buffer (concat "+" old-folder))
		   (switch-to-buffer (concat "+" mh-folder))
		   (end-of-file)
		   (&mh-update-headers)
		   (&mh-unmark-all-headers 0)
		   (beginning-of-line)
		   (goto-character (+ (dot) 3))
		   (delete-next-character)
		   (insert-character '+')
		   (beginning-of-line)
		   (setq mh-direction 1)
		   (temp-use-buffer "mh-temp") (erase-buffer)
		   (insert-string global-mode-string)
		   (beginning-of-file)
		   (error-occured (search-forward " Mail")
		       (region-around-match 0)
		       (erase-region)
		       (set-mark) (beginning-of-file)
		       (setq global-mode-string (region-to-string))
		   )
		   (temp-use-buffer (concat "+" mh-folder))
	    )
	    (progn 
		   (message "No new mail.") (sit-for 10)
		   (send-string-to-terminal "")
		   (pop-to-buffer (concat "+" mh-folder))
	    )
	)
	(&mh-restore-killbuffer)
    )
)
