#! /bin/csh
if ( -e diff ) rm diff
#set out = /tmp/diff
set out = diff
#set outtmp = /tmp/difftmp
set outtmp = difftmp
cat /dev/null >! $out
#cd may-day-4b
foreach f (*.lisp *.text)
#set old = ../may-day-4/$f
set old = ../../../may-day-4b/$f
echo "====================" >> $out
if ( -e $old ) then
  diff -c5 $old $f >&! $outtmp
  if (! $status) then
     echo "   " $old >> $out
     echo "   " $f >> $out
  endif
  cat $outtmp >> $out
else
  echo "   " $old "does not exist." >> $out
  echo "   " $f >> $out
  cat $f >> $out
  echo " " >> $out
endif
end
echo "====================" >> $out
cd ..
#mv $out .
#Then, use emacs, and type:
# c-X c-F diff RET
# c-X ( c-S c-Q TAB ESC c-A c-F c-F RET c-SPACE c-E m-X untabify RET c-A DEL c-E c-X )
# m-X name-last-kbd-macro RET untabify-diff-output RET
# m-0 m-X untabify-diff-output RET c-X c-S
#or, eval the following expression to define the macro:
#(fset 'untabify-diff-output "	 øuntabify")
