rejeep / prodigy.el

Manage external services from within Emacs
GNU General Public License v3.0
552 stars 39 forks source link

Compilation warning `discover-add-context-menu' #27

Closed yveszoundi closed 10 years ago

yveszoundi commented 10 years ago

This is very minor, but I just wanted to let you know.

When installing prodigy, I get the following message, which seems to be related to discover.el integration.

prodigy.el:715:1:Warning: the function `discover-add-context-menu' is 
not known to be defined.

I'm no Emacs Lisp guru, but I believe that the warning disappears by adding a declare-function as follow and/or doing a fboundp check.

;; Not need but likely make sense as not require'd
(declare-function 'discover-add-context-menu "discover" nil)

(defun prodigy-discover-initialize ()
  "Initialize discover by adding prodigy context menu."  
(when (fboundp 'discover-add-context-menu)
 (discover-add-context-menu   
   :context-menu prodigy-discover-context-menu
   :bind "?"
   :mode 'prodigy-mode
   :mode-hook 'prodigy-mode-hook)))
rejeep commented 10 years ago

Thanks for reporting, fixed in https://github.com/rejeep/prodigy.el/commit/986951989fdbcd831cb93eb66c2d4c97a5d24466