Suppress log module when inserting date stamps in ERC
* lisp/erc/erc-log.el (erc-truncate-buffer-on-save): Use
`make-obsolete-variable' because `erc-truncate-buffer-on-save' is an
option, not a function. Already mentioned in etc/ERC-NEWS.
(erc-logging-enabled): Return nil if `log' appears in the `erc--skip'
msg prop.
* lisp/erc/erc-stamp.el (erc-stamp--defer-date-insertion-on-post-modify):
Add `log' to `erc--skip' msg prop. This tells the log module to defer
advancing the `erc-last-saved-position' marker until after stamps have
been inserted, thus ensuring they're included in logs when
`erc-log-write-after-insert' is non-nil.
* test/lisp/erc/erc-scenarios-log.el
(erc-scenarios-log--save-buffer-in-logs/truncate-on-save): Suppress
warning for `erc-truncate-buffer-on-save'.
(erc-scenarios-log--write-after-insert): New test. (Bug#76875)
(cherry picked from commit
3db65ff5cb3d6f58b83052760b4ce04eb77db1bc)