How do I silence the byte-compiler here? With this code:
(eval-when-compile
(require ‘org-agenda))
;;;###autoload
(defun very-dumb-package-feature-1 ()
(interactive)
(require ‘org-agenda)
(org-agenda-show)
(message “1”))
It says:
very-dumb-package.el:10:4: Warning: the function ‘org-agenda-show’ might not
be defined at runtime.
Just (require ‘org-agenda) fixes this, but it also loads `org-agenda’ whenever the package is loaded, which I want to avoid.
(declare-function org-agenda-show “org-agenda”) also fixes that, but I don’t see why `eval-when-compile’ isn’t enough. It’s cumbersome to declare all the required functions if there are several.
#emacs #elisp