lnz@LUCID.COM (Leonard N. Zubkoff) (03/30/89)
On machines where MAIL_USE_FLOCK is true, movemail truncates
/usr/spool/mail/$USER rather than deleting it. Unfortunately,
rmail-insert-inbox-text will append a newline to the RMAIL buffer
whenever the file exists, not only if it is nonempty. This causes
the problem that the G command marks the buffer as modified even
if no mail was found, leading to unnecessary saving of the RMAIL
file. The fix is to replace the lines:
(progn (goto-char (point-max))
(insert-file-contents tofile)
(goto-char (point-max))
(or (= (preceding-char) ?\n)
(insert ?\n))
with:
(progn (goto-char (point-max))
(or (zerop (nth 1 (insert-file-contents tofile)))
(progn
(goto-char (point-max))
(or (= (preceding-char) ?\n)
(insert ?\n))))
in rmail-insert-inbox-text.
Leonard