K-Meleon's macro system experienced a major revision in version 1.1 of the browser. The Macro Extension Plugin now supports modular macros. The macro definition file (macros.cfg) - that grew from 44 lines of code (of which only a small fraction was functional) in K-Meleon 0.4 to over 1400 lines of code in K-Meleon 0.9 - was split into independent macro modules (*.kmm files). These modules are placed in dedicated macro folders. Thanks to some extensions of the Macro Language, it is now possible to use macros to integrate commands into the browser's menus and to set keyboard accelerators for commands. It is no longer necessary to manually edit menus.cfg and accel.cfg in order to integrate new macros.
Alongside revision of the macro system, also the configuration file system was revised. K-Meleon now has a proper folder support. The default macro modules are placed in the Macro Folder, the default configuration files are placed in the Default Settings Folder. Both folders are subfolders of the K-Meleon root folder and are thus accessible to an installer application in order to apply patches and updates. Users can keep their customizations safe in their User Macro Folder and their Settings Folder. The syntax of accel.cfg and menus.cfg was extended to allow alterations of the default configuration and to allow incremental additions to it.
The new system is downwards compatible. You are not forced to use the new system if you don't want to. When an old macro definition file (macros.cfg) is found in your Settings Folder, it is used and the new macro modules are ignored. Note that an old macros.cfg must be accompanied by an appropriate menus.cfg because all macro references have been removed from the default menu definition file.
When no macros.cfg is found in your Settings Folder, the Macro Folder is searched for the Main Macro Module (main.kmm). When this module is found, it is loaded, otherwise no macros are loaded at all. When the main macro module was loaded, all the other modules located in the Macro Folder are loaded in alphabetical order. Finally, the modules located in the User Macro Folder are loaded (in alphabetical order aswell).