diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el index 5a87effc6..921bab6eb 100644 --- a/lisp/ox-beamer.el +++ b/lisp/ox-beamer.el @@ -828,7 +828,8 @@ holding export options." (replace-regexp-in-string "^[ \t]*\\\\documentclass\\(\\(\\[.*\\]\\)?\\)" class-options header t nil 1))))) - (when document-class-string + (if (not document-class-string) + (user-error "Unknown LaTeX class `%s'") (org-latex-guess-babel-language (org-latex-guess-inputenc (org-splice-latex-header diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index d8a2af431..a49be0c37 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -1108,7 +1108,8 @@ holding export options." (replace-regexp-in-string "^[ \t]*\\\\documentclass\\(\\(\\[.*\\]\\)?\\)" class-options header t nil 1))))) - (when document-class-string + (if (not document-class-string) + (user-error "Unknown LaTeX class `%s'") (org-latex-guess-babel-language (org-latex-guess-inputenc (org-splice-latex-header