wise to autoload the configuration? (do conflicts with other packages exist?)
I'm also musing about adding Debian-specific autoload cookies to run the configuration section automatically, for a better/more convenient "out of the box" experience, but I worry that it might conflict with another mode. What do you think?
Never heard of a conflict with another package.
All functions should be unique (they are prefixed with irony- and I never heard of another Emacs package using the same namespace).
However, it happens that the configuration needs some adjustments, for example this hook:
(add-hook 'c-mode-hook 'irony-mode)
c-mode is inherited by some other mode, such as php-mode. So for some people this can be inconvenient and they enable irony-mode under some conditions only.
So I don't know how other packages into Debian handles the configuration part. Would be interesting to compare with some others to get any idea of what is right or wrong.
Touché! You're absolutely right, php-mode inheriting an autoloaded c-mode-hook for irony-mode should be avoided--someone would be annoyed by this enough to file a bug report if I enabled that ;-) I've only seen Debian Emacs addons autoconfigure modes when there wasn't any overlap between packages' functionality. The principle of least surprise is adhered to, and this often means leaving configuration up to the user.
How much would adding a conditional check slow things down? If irony-mode isn't useful with any derived modes, then for whitelisted in c-mode, c++-mode, and objc-mode (not (if (bound-and-true-p whitelisted, and exit early, somewhere, seems like it ought to do the trick...but that seems like it would break things like using irony-mode on code blocks in org-mode. Hmm. Maybe it is best to leave it up to the user after all?