diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index d30467aab..1b0fcb7c4 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -2451,7 +2451,7 @@ contextual information." (let ((code (org-element-property :value inline-src-block)) (lang (org-element-property :language inline-src-block))) (pcase (plist-get info :latex-src-block-backend) - (`verbatim (org-latex--text-markup code 'code info)) + ((or `verbatim (guard (not lang))) (org-latex--text-markup code 'code info)) (`minted (org-latex-inline-src-block--minted info code lang)) (`engraved (org-latex-inline-src-block--engraved info code lang)) (`listings (org-latex-inline-src-block--listings info code lang)) diff --git a/lisp/ox-man.el b/lisp/ox-man.el index 1f296baeb..5ef4dc63f 100644 --- a/lisp/ox-man.el +++ b/lisp/ox-man.el @@ -510,8 +510,9 @@ contextual information." (expand-file-name "reshilite" tmpdir))) (org-lang (org-element-property :language inline-src-block)) (lst-lang - (cadr (assq (intern org-lang) - (plist-get info :man-source-highlight-langs)))) + (and org-lang + (cadr (assq (intern org-lang) + (plist-get info :man-source-highlight-langs))))) (cmd (concat (expand-file-name "source-highlight") " -s " lst-lang @@ -757,8 +758,9 @@ contextual information." (code (org-element-property :value src-block)) (org-lang (org-element-property :language src-block)) (lst-lang - (cadr (assq (intern org-lang) - (plist-get info :man-source-highlight-langs)))) + (and org-lang + (cadr (assq (intern org-lang) + (plist-get info :man-source-highlight-langs))))) (cmd (concat "source-highlight" " -s " lst-lang " -f groff_man " diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el index f180660de..a7323c657 100644 --- a/lisp/ox-odt.el +++ b/lisp/ox-odt.el @@ -3111,7 +3111,7 @@ and prefix with \"OrgSrc\". For example, (defun org-odt-do-format-code (code info &optional lang refs retain-labels num-start) (let* ((lang (or (assoc-default lang org-src-lang-modes) lang)) - (lang-mode (and lang (intern (format "%s-mode" lang)))) + (lang-mode (if lang (intern (format "%s-mode" lang)) #'ignore)) (code-lines (org-split-string code "\n")) (code-length (length code-lines)) (use-htmlfontify-p (and (functionp lang-mode) diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el index ed2c3102e..bd01effaa 100644 --- a/lisp/ox-texinfo.el +++ b/lisp/ox-texinfo.el @@ -1681,8 +1681,9 @@ as a communication channel." "Transcode a SRC-BLOCK element from Org to Texinfo. CONTENTS holds the contents of the item. INFO is a plist holding contextual information." - (let* ((lisp (string-match-p "lisp" - (org-element-property :language src-block))) + (let* ((lisp (string-match-p + "lisp" + (or (org-element-property :language src-block) ""))) (code (org-texinfo--sanitize-content (org-export-format-code-default src-block info))) (value (format