]> git.eshelyaron.com Git - emacs.git/commitdiff
When byte-compiling, correctly output declare-function directives
authorJohn Wiegley <johnw@newartisans.com>
Wed, 29 Nov 2017 04:31:40 +0000 (20:31 -0800)
committerJohn Wiegley <johnw@newartisans.com>
Wed, 29 Nov 2017 04:31:40 +0000 (20:31 -0800)
Fixes https://github.com/jwiegley/use-package/issues/474

lisp/use-package/use-package.el

index 7ee7ac0efa285daa06995c565bc6487236b74e32..7185999d14d7f6d334506d5ee78408d387312a2c 100644 (file)
@@ -1690,6 +1690,9 @@ this file.  Usage:
                  `(eval-when-compile
                     ,@(mapcar #'(lambda (var) `(defvar ,var))
                               (plist-get args :defines))
+                    ,@(mapcar #'(lambda (fn) `(declare-function
+                                          ,fn ,(use-package-as-string name)))
+                              (plist-get args :functions))
                     (with-demoted-errors
                         ,(format "Cannot load %s: %%S" name)
                       ,(if (eq use-package-verbose 'debug)