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.
This commit is contained in:
Fabrice Popineau 2016-07-07 11:25:12 +02:00 committed by Nicolas Goaziou
parent e31587fa13
commit ebe7aa6692
1 changed files with 1 additions and 1 deletions

View File

@ -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