From ebe7aa66928a01f3af89c9ebeb5c5e130a5b3265 Mon Sep 17 00:00:00 2001 From: Fabrice Popineau Date: Thu, 7 Jul 2016 11:25:12 +0200 Subject: [PATCH] org-eldoc: Handle source blocks with empty language * contrib/lisp/org-eldoc.el (org-eldoc-get-src-header): When inserting a new src block, the language may not yet be chosen when this is called. --- contrib/lisp/org-eldoc.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/lisp/org-eldoc.el b/contrib/lisp/org-eldoc.el index 76ca3f5b1..9f2fef9d5 100644 --- a/contrib/lisp/org-eldoc.el +++ b/contrib/lisp/org-eldoc.el @@ -70,7 +70,7 @@ (save-match-data (when (looking-at "^[ \t]*#\\+\\(begin\\|end\\)_src") (setq info (org-babel-get-src-block-info 'light) - lang (propertize (nth 0 info) 'face 'font-lock-string-face) + lang (propertize (or (nth 0 info) "no lang") 'face 'font-lock-string-face) hdr-args (nth 2 info)) (concat lang