소스 검색

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 년 전
부모
커밋
9227445899
1개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  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)))))