]> git.eshelyaron.com Git - emacs.git/commitdiff
assume the declare-function macro exists
authorJonas Bernoulli <jonas@bernoul.li>
Sun, 7 Sep 2014 12:43:56 +0000 (14:43 +0200)
committerJonas Bernoulli <jonas@bernoul.li>
Sun, 7 Sep 2014 12:43:56 +0000 (14:43 +0200)
Since `declare-function' was added in Emacs 23.1 (five years ago), we
don't need to assert that it is defined.  If the assertion was without
any problems there would be no harm in keeping it, but unfortunately it
causes a compile warning.  Because `declare-function' is a macro with
always expands to `nil' the value of (fboundp 'declare-function) ends
up being unused.

lisp/use-package/use-package.el

index 7b370380d4b039e1ea387c36da4c4c11794d2d5b..7e4738fc9fe76e2cfb9f39499419f2a00e292a9f 100644 (file)
@@ -41,8 +41,7 @@
 (require 'bytecomp)
 (require 'diminish nil t)
 
-(when (fboundp 'declare-function)
-  (declare-function package-installed-p 'package))
+(declare-function package-installed-p 'package)
 
 (defgroup use-package nil
   "A use-package declaration for simplifying your `.emacs'."