Explorar o código

ox-publish: Raise an error on undefined components (take 2)

* lisp/ox-publish.el (org-publish-expand-projects): Raise an error on
  undefined components.
Nicolas Goaziou %!s(int64=8) %!d(string=hai) anos
pai
achega
9227445899
Modificáronse 1 ficheiros con 6 adicións e 2 borrados
  1. 6 2
      lisp/ox-publish.el

+ 6 - 2
lisp/ox-publish.el

@@ -418,8 +418,12 @@ This splices all the components into the list."
     (while (setq p (pop rest))
       (if (setq components (plist-get (cdr p) :components))
 	  (setq rest (append
-		      (mapcar (lambda (x) (assoc x org-publish-project-alist))
-			      components)
+		      (mapcar
+		       (lambda (x)
+			 (or (assoc x org-publish-project-alist)
+			     (user-error "Unknown component %S in project %S"
+					 x (car p))))
+		       components)
 		      rest))
 	(push p rtn)))
     (nreverse (delete-dups (delq nil rtn)))))