]> code.delx.au - gnu-emacs-elpa/commitdiff
Fix failed autoloads because of not-loaded requires
authorArtur Malabarba <bruce.connor.am@gmail.com>
Thu, 23 Jul 2015 13:34:29 +0000 (14:34 +0100)
committerArtur Malabarba <bruce.connor.am@gmail.com>
Thu, 23 Jul 2015 13:34:29 +0000 (14:34 +0100)
names.el

index 33f41a263c9bda50b35dbea763b92add8ff5aa0f..189b0579e2982e4cf87b21ced0c1ce81f71621d2 100644 (file)
--- a/names.el
+++ b/names.el
@@ -444,8 +444,15 @@ See `define-namespace' for more information."
           (push key-and-args names--keywords))
 
         ;; First have to populate the bound and fbound lists. So we read
-        ;; the entire form (without evaluating it).
-        (mapc 'names-convert-form body)
+        ;; the entire form (without return it).
+        (if names--inside-make-autoload
+            ;; Dependencies haven't been loaded during autoload
+            ;; generation, so we better ignore errors here. Ideally we
+            ;; would only go through the forms marked for autoloading,
+            ;; but then we wouldn't know what symbols are var/function
+            ;; names.
+            (mapc (lambda (form) (ignore-errors (names-convert-form form))) body)
+          (mapc #'names-convert-form body))
         (setq names--current-run (1+ names--current-run))
 
         ;; Then we go back and actually namespace the entire form, which