In Elisp packages, we sometimes want to use a feature only if the user has installed another package without specifying that package as a dependency for our own. E.g.
(when (require 'markdown-mode nil 'noerror) (markdown-mode))
This, however, causes a byte-compiler warning:
Warning: the function
markdown-modeis not known to be defined.
What's the right way to address this?
with-no-warnings is one option, but it needs to be wrapped around every such use. Is there a better way?