#!/bin/sh

#this file is to be put in your search path and made executable
#by 'chmod +x hmailedit'

# set your favorite Hangul editor to HEDITOR
# Pico users should  give '-t' option, i.e. 'pico -t' instead of 'pico'
# Emacs,Mule,Hanemacs users may give '-nw' option
HEDITOR=$EDITOR 

# 'hmconv' is to be put in your search path

new=/tmp/$$.`basename $1`
trap 'rm -f /tmp/$$.*; exit 1' 1 2 15
hmconv -u  $1 $new
$HEDITOR $new
if test -r $new ;
then 
 hmconv $new $1  # Pine users may choose to replace this line with'cp $new $1"
                 # In that case, 'sending filter', hmconv always has to be 
                 # used for hangul mail  except for local mail.
fi
/bin/rm $new
