- Theme registry clutter in common.inc.
- Move drupal_common_theme() out of common.inc.
- drupal_common_theme() registers theme functions and templates on behalf of:
- HTML, page, region rendering
- general HTML: link, link list, item list, image, table, html_tag
- subsystems: menu tree, breadcrumb, pager, tablesort, progress bar, form elements, render elements
- common UI elements: messages, "mark", more help link, feed icon
- modules: username, indentation
- installer: maintenance_page, install_page, update_page, task list, authorize message/report
- Some of them have corresponding entries in hook_element_info() of system.module.
- All of them require the theme system to be initialized, but after decoupling the installer from system.module, most of them need to work in a maintenance theme context (without DB, without module system).
- Move drupal_common_theme() into system.module. Doesn't really solve anything.
- Create a new element.module or element.inc include file/subsystem. Move it in there as element_theme(). Allows to move further element_* functionality in there.
---- OP ----
Since hooks are pretty much exclusive to modules, it makes sense to put them in there as well. Dereine and I discussed that moving
drupal_common_theme() to system.module would be a logical step. I will try to find out if this is possible.