view move-if-change @ 32420:40df6727225a

(save_excursion_save): Additionally record the selected window. (save_excursion_restore): If buffer was visible in a window, and a different window was selected, and the old selected window is still live, restore point in that window.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 12 Oct 2000 13:05:29 +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