From: Nicolas Richard Date: Thu, 11 Dec 2014 07:42:53 +0000 (+0100) Subject: Don't add autoload for existing commands X-Git-Tag: emacs-29.0.90~1306^2~15^2~404^2~5^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a2b23f8326;p=emacs.git Don't add autoload for existing commands --- diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index 570044970ea..654ed8d02b0 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -434,8 +434,10 @@ For full documentation. please see commentary. (not (use-package-plist-get args :demand))) (let (form) (mapc #'(lambda (command) - (push `(autoload (function ,command) - ,name-string nil t) form)) + (push `(unless (fboundp (quote ,command)) + (autoload (function ,command) + ,name-string nil t)) + form)) commands) `(when ,(or predicate t)