view move-if-change @ 106480:a4e55fa99487

Prevent save-buffer in Rmail buffers from using the coding-system of the current message, and from clobbering the encoding mnemonics in the mode line (Bug#4623). (rmail-swap-buffers): Swap encoding and modified flag, too. (rmail-message-encoding): New variable. (rmail-write-region-annotate): Record the encoding of the current message in rmail-message-encoding. (rmail-after-save-hook): New function, restores the encoding of the current message after the message collection is saved.
author Eli Zaretskii <eliz@gnu.org>
date Mon, 07 Dec 2009 19:21:15 +0000
parents 354e0c45cedf
children 14a97ab281d5
line wrap: on
line source

#!/bin/sh
if
test -r $2
then
if
cmp $1 $2 > /dev/null
then
echo $2 is unchanged
rm -f $1
else
mv -f $1 $2
fi
else
mv -f $1 $2
fi