scm: add changed-object, use if-let/when-let

Add a changed-object (to complement changed), and some rework some of
the code with the new if-let/when-let macros.
This commit is contained in:
Dirk-Jan C. Binnema
2026-07-29 23:55:25 +03:00
committed by Seth Ladygo
parent 8c9734066f
commit 4a8b797665
3 changed files with 24 additions and 17 deletions

View File

@ -840,16 +840,21 @@ Does this message include a calendar invitation? Returns @t{#t} or @code{#f}.
@deffn {Scheme Procedure} changed message
@end deffn
@deffn {Scheme Procedure} changed-object message
@end deffn
Get the time of the message's last change (through @t{mu}), or @code{#f} if there
is none. The time is expressed the data as the number of seconds since epoch,
@t{time_t}.
For example:
@lisp
(last-change msg)
(changed msg)
=> 1703336567
@end lisp
@code{changed-object} returns a value as a SRFI-19 date object, similar to
@code{date-object}, but without any time-zone offset.
@deffn {Scheme Procedure} priority message
@end deffn
Get the message's priority. This is a symbol, either @t{high}, @t{normal} or