An AutoPat has the member next which points to another AutoPat or NULL. This allows to create a linked list.
An AutoPat also has the member to a (linked list) of AutoCmd. Each AutoCmd stores a command (char_u *cmd). These commands are executed if the AutoPat that the AutoCmd hangs on matches the conditions stored in the AutoPat.
Each element of the last_autopat array points to tha last AutoPat in an event's linked list of AutoPat.
The general design of these linked lists is depicted in the following graphic: