From f55f7a1ccba127dfe9983eb9a4d1eea584f3ffd7 Mon Sep 17 00:00:00 2001
From: Fabrice Popineau <fabrice.popineau@gmail.com>
Date: Thu, 7 Jul 2016 11:25:12 +0200
Subject: [PATCH] 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 3b112a6..ea12037 100644
--- a/contrib/lisp/org-eldoc.el
+++ b/contrib/lisp/org-eldoc.el
@@ -74,7 +74,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
-- 
2.9.0

base-commit: 286b53e9d5dc7c3f6989715ef48814bdfaff6d04
