Attempt to save the last dregs of emacs users' sanity by saving the

contents of the PR when an interrupt is received during the editor
session.  This stops the use of ^G from deleting a filled PR from
underneath the user.

PR:		bin/59201
Submitted by:	Heikki Suonsivu <hsu@evoluutio.bbnetworks.net>
MFC After:	2 weeks
This commit is contained in:
Ceri Davies 2003-11-12 23:08:23 +00:00
parent dafa835522
commit aca4a77119
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=122587

View File

@ -262,7 +262,7 @@ TEMP=`mktemp -t pf` || exit 1
# Catch some signals. ($xs kludge needed by Sun /bin/sh)
xs=0
trap 'rm -f $REF $TEMP; exit $xs' 0
trap 'echo "$COMMAND: Aborting ..."; rm -f $REF $TEMP; xs=1; exit' 1 2 3 13 15
trap 'echo "$COMMAND: Aborting ... saving unfinished PR into /tmp/pr.$$"; rm -f $REF ; mv $TEMP /tmp/pr.$$; xs=1; exit' 1 2 3 13 15
# If they told us to use a specific file, then do so.
if [ -n "$IN_FILE" ]; then