#!/bin/sh
TMPFILE=`mktemp`
#save the timestamp
touch -r $1 $TMPFILE
emacs $1
#restore the timestamp after truncation
touch -r $TMPFILE $1
rm $TMPFILE
