]> git.eshelyaron.com Git - emacs.git/commitdiff
Always return t on a successful init-time load
authorJohn Wiegley <johnw@newartisans.com>
Tue, 17 Mar 2015 03:12:52 +0000 (22:12 -0500)
committerJohn Wiegley <johnw@newartisans.com>
Tue, 17 Mar 2015 03:12:52 +0000 (22:12 -0500)
Fixes https://github.com/jwiegley/use-package/issues/174

lisp/use-package/use-package.el

index 224eb375028d8bc207ab676cb5d1d5a496f6740d..561b12d74a52199607e30d908298343cc9bfddfe 100644 (file)
@@ -105,6 +105,9 @@ possible."
   :type 'boolean
   :group 'use-package)
 
+(eval-when-compile
+  (defvar use-package-expand-minimally))
+
 (defmacro use-package-expand (name label form)
   (declare (indent 1))
   (when form
@@ -479,7 +482,8 @@ possible."
           (if config-body
               `((eval-after-load ',name
                   ;; '(,config-defun)
-                  ',config-body*))))
+                  ',config-body*)))
+          (list t))
        `(,(macroexpand
            `(use-package-with-elapsed-timer
               ,(format "Loading package %s" name-string)
@@ -488,15 +492,18 @@ possible."
                     (use-package-cat-maybes
                      (list `(require ',name-symbol))
                      bindings
-                     (list config-body*)))
+                     config-body
+                     (list t)))
                  `(if (not (require ',name-symbol nil t))
-                      (display-warning
-                       'use-package
-                       (format "Could not load package %s" ,name-string)
-                       :error)
+                      (ignore
+                       (display-warning
+                        'use-package
+                        (format "Could not load package %s" ,name-string)
+                        :error))
                     ,@(use-package-cat-maybes
                        bindings
-                       (list config-body*)))))))))))
+                       config-body
+                       (list t)))))))))))
 
 (defmacro use-package (name &rest args)
   "Declare an Emacs package by specifying a group of configuration options.