Browse Source

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 8 năm trước cách đây
mục cha
commit
9227445899
1 tập tin đã thay đổi với 6 bổ sung2 xóa
  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)))))