I have a package that enhances the functionality of another package. To save the user the effort of any additional configurating, I would like my package to load automatically if the larger package loads.
(In my example, my package is a Flycheck checker, but I don’t think this situation will be specific to Flycheck checkers).
Is there a standard idiom for achieving this?
I find myself tempted to put the following at the end of my package:
;;;###autoload (with-eval-after-load 'flycheck (unless (featurep 'flycheck-mychecker) (require 'flycheck-mychecker)))
package-lint tells me:
warning: `with-eval-after-load' is for use in configurations, and should rarely be used in packages
However, I couldn’t find an explanation of why this is typically bad in packages, and in what circumstances the “rarely used” exception should apply.