Whenever a profile is being created, it takes the pointer to a parent profile as argument in the constructor. This pointer may be NULL. A profile is therefore defined by two parameters: its name and its parent profile.
The Motivation behind this is to have the behaviour of different parts of Mahogany change dynamically as they are being used, to make them context aware. For example, a ComposeView used to reply to a message from a mailing list might set a different return address to a ComposeView writing a message to a friend. Depending on from where the ComposeView was created, it will have different parent profiles (i.e. the profile of the folder with mailing list mails or the INBOX mailfolder profile or the mailfolder containing mails from my friends). Also, the MessageView window can inherit its settings from the folder that its messages are stored in (it inherits from the FolderView which inherits from the mailfolder) and therefore if a mailfolder is likely to contain lots of long mails (e.g. the Mahogany developers ranting about the advantages and shortcomings of different features), it can have a smaller typeface configured for displaying the messages - configured at the mailfolder level, not for a particular MessageView.